[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor/master] Fix compiling under gcc warnings to errors



commit be7ef94a7dbfa67d03ca175789590efefca7b3d1
Author: Ola Bini <ola@xxxxxxxxxx>
Date:   Mon Oct 5 13:41:00 2015 -0500

    Fix compiling under gcc warnings to errors
---
 src/test/log_test_helpers.c |    3 ++-
 src/test/log_test_helpers.h |    2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/test/log_test_helpers.c b/src/test/log_test_helpers.c
index 42778d4..0efa3ce 100644
--- a/src/test/log_test_helpers.c
+++ b/src/test/log_test_helpers.c
@@ -33,7 +33,7 @@ mock_clean_saved_logs(void)
   saved_logs = NULL;
 }
 
-char *
+const char *
 mock_saved_log_at(int ix)
 {
   int saved_log_count = mock_saved_log_number();
@@ -76,6 +76,7 @@ mock_saved_logs(void)
 void
 mock_saving_logv(int severity, log_domain_mask_t domain, const char *funcname, const char *suffix, const char *format, va_list ap)
 {
+  (void)domain;
   char *buf = tor_malloc_zero(10240);
   int n;
   n = tor_vsnprintf(buf,10240,format,ap);
diff --git a/src/test/log_test_helpers.h b/src/test/log_test_helpers.h
index 789bfe4..debc167 100644
--- a/src/test/log_test_helpers.h
+++ b/src/test/log_test_helpers.h
@@ -20,7 +20,7 @@ void mock_clean_saved_logs(void);
 const smartlist_t *mock_saved_logs(void);
 int setup_capture_of_logs(int new_level);
 void teardown_capture_of_logs(int prev);
-char *mock_saved_log_at(int ix);
+const char *mock_saved_log_at(int ix);
 int mock_saved_severity_at(int ix);
 int mock_saved_log_number(void);
 



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits