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

[tor-commits] [tor/master] Fix warnings in test_config_fix_my_family



commit 37534880113133716b220bf6d5ffaaf910072b30
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date:   Tue Sep 3 13:35:44 2013 -0400

    Fix warnings in test_config_fix_my_family
---
 src/test/test_config.c |   12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/src/test/test_config.c b/src/test/test_config.c
index 911913a..6a285db 100644
--- a/src/test/test_config.c
+++ b/src/test/test_config.c
@@ -4,6 +4,8 @@
 /* See LICENSE for licensing information */
 
 #include "orconfig.h"
+
+#define CONFIG_PRIVATE
 #include "or.h"
 #include "addressmap.h"
 #include "config.h"
@@ -515,12 +517,14 @@ static void
 test_config_fix_my_family(void *arg)
 {
   char *err = NULL;
-  char *family = "$1111111111111111111111111111111111111111, "
-                 "1111111111111111111111111111111111111112, "
-                 "$1111111111111111111111111111111111111113";
+  const char *family = "$1111111111111111111111111111111111111111, "
+                       "1111111111111111111111111111111111111112, "
+                       "$1111111111111111111111111111111111111113";
 
   or_options_t* options = options_new();
   or_options_t* defaults = options_new();
+  (void) arg;
+
   options_init(options);
   options_init(defaults);
   options->MyFamily = tor_strdup(family);
@@ -528,7 +532,7 @@ test_config_fix_my_family(void *arg)
   options_validate(NULL, options, defaults, 0, &err) ;
 
   if (err != NULL) {
-    test_fail_msg(err);
+    TT_FAIL(("options_validate failed: %s", err));
   }
 
   test_streq(options->MyFamily, "$1111111111111111111111111111111111111111, "

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