[or-cvs] [tor/master 3/3] Fix a compile warning on OS X 10.6

nickm at torproject.org nickm at torproject.org
Mon Aug 2 16:51:07 UTC 2010


Author: Sebastian Hahn <sebastian at torproject.org>
Date: Mon, 2 Aug 2010 18:44:00 +0200
Subject: Fix a compile warning on OS X 10.6
Commit: a9d055c5c516924b2e87e416b154bf220b0a914e

Also update the changes file to contain a note on which bug was
fixed by this.
---
 changes/bug1384 |    2 +-
 src/or/config.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/changes/bug1384 b/changes/bug1384
index d3da65d..9c406d9 100644
--- a/changes/bug1384
+++ b/changes/bug1384
@@ -1,5 +1,5 @@
   o Minor features:
     - Warn when the same option is provided more then once in a torrc file,
       on the command line, or in a single SETCONF statement, and option
-      is one that only accepts a single value.
+      is one that only accepts a single value. Closes bug 1384.
 
diff --git a/src/or/config.c b/src/or/config.c
index 34bad4c..0a26c84 100644
--- a/src/or/config.c
+++ b/src/or/config.c
@@ -1761,7 +1761,7 @@ config_assign_line(config_format_t *fmt, or_options_t *options,
                        var->type != CONFIG_TYPE_LINELIST_S)) {
     /* We're tracking which options we've seen, and this option is not
      * supposed to occur more than once. */
-    int var_index = var - fmt->vars;
+    int var_index = (int)(var - fmt->vars);
     if (bitarray_is_set(options_seen, var_index)) {
       log_warn(LD_CONFIG, "Option '%s' used more than once; all but the last "
                "value will be ignored.", var->name);
-- 
1.7.1



More information about the tor-commits mailing list