diff options
author | Nick Mathewson <nickm@torproject.org> | 2006-06-04 22:42:13 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2006-06-04 22:42:13 +0000 |
commit | 853e2d99b64cc886377f95b8f74e9f549769c410 (patch) | |
tree | 3c5949273d8d13229b51bdb8a2ecf4581d27dd18 /src/or/config.c | |
parent | c4647545a02bd5f6b28bdb2bcd50a915ef04cf8c (diff) | |
download | tor-853e2d99b64cc886377f95b8f74e9f549769c410.tar.gz tor-853e2d99b64cc886377f95b8f74e9f549769c410.zip |
Add a new warning to our "warn a lot" list: unused parameters. This means we have to explicitly "use" unuseds, but it can catch bugs. (It caught two coding mistakes so far.)
svn:r6532
Diffstat (limited to 'src/or/config.c')
-rw-r--r-- | src/or/config.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/or/config.c b/src/or/config.c index 73d2d85aac..b1a5ebe245 100644 --- a/src/or/config.c +++ b/src/or/config.c @@ -1489,6 +1489,7 @@ static void option_clear(config_format_t *fmt, or_options_t *options, config_var_t *var) { void *lvalue = STRUCT_VAR_P(options, var->var_offset); + (void)fmt; /* unused */ switch (var->type) { case CONFIG_TYPE_STRING: tor_free(*(char**)lvalue); @@ -3601,6 +3602,10 @@ static int or_state_validate(or_state_t *old_state, or_state_t *state, int from_setconf, char **msg) { + /* We don't use these; only options do. Still, we need to match that + * signature. */ + (void) from_setconf; + (void) old_state; if (entry_guards_parse_state(state, 0, msg)<0) { return -1; } |