Browse Source

Fix compiling under gcc warnings to errors

Ola Bini 9 years ago
parent
commit
be7ef94a7d
2 changed files with 3 additions and 2 deletions
  1. 2 1
      src/test/log_test_helpers.c
  2. 1 1
      src/test/log_test_helpers.h

+ 2 - 1
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);

+ 1 - 1
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);