aboutsummaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2008-09-09 19:29:33 +0000
committerNick Mathewson <nickm@torproject.org>2008-09-09 19:29:33 +0000
commit6c432a5565183b705569310a34b4da54b1bf98d4 (patch)
tree792f555c7ad681ce92b13bfcf434294245541610 /src/common
parentfa64d8041f88857de1e3b140c3df39022fba32ae (diff)
downloadtor-6c432a5565183b705569310a34b4da54b1bf98d4.tar
tor-6c432a5565183b705569310a34b4da54b1bf98d4.tar.gz
Replace the dummy-use var in SMARTLIST_FOREACH_END() with one that is less likely to confuse analysis tools into thinking we do use after free. Arguably, (void)x should count as use in suppressing unused variable warnings, but not in generating hey-you-used-a-variable warnings. Arguably, though, it shouldn't.
svn:r16815
Diffstat (limited to 'src/common')
-rw-r--r--src/common/container.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/common/container.h b/src/common/container.h
index 598e27aaa..0a790ea4a 100644
--- a/src/common/container.h
+++ b/src/common/container.h
@@ -204,7 +204,7 @@ char *smartlist_join_strings2(smartlist_t *sl, const char *join,
var = (sl)->list[var ## _sl_idx];
#define SMARTLIST_FOREACH_END(var) \
- (void)var; \
+ var = NULL; \
} STMT_END
#define SMARTLIST_FOREACH(sl, type, var, cmd) \