diff options
author | Keith Bostic <keith@wiredtiger.com> | 2014-07-03 12:01:51 -0400 |
---|---|---|
committer | Keith Bostic <keith@wiredtiger.com> | 2014-07-03 12:01:51 -0400 |
commit | c6402f8e38191212f5db219aa86c8ba753bc15bb (patch) | |
tree | a34c5a33a2b7ed06c38596905ed4f4ab9b0aea1b /bench | |
parent | d5a759006d2c030dce446dce78addca090a84336 (diff) | |
download | mongo-c6402f8e38191212f5db219aa86c8ba753bc15bb.tar.gz |
Dueling static analyzers: clang's scan-build thinks it's a dead read if
typestr is set outside the switch as well as inside the switch, gcc 4.1
warnings and FlexeLint think that typestr might not be used if it's not
set outside the switch statement. Set one case outside of the switch,
and just break on that value inside the switch.
Diffstat (limited to 'bench')
-rw-r--r-- | bench/wtperf/config.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bench/wtperf/config.c b/bench/wtperf/config.c index 73528536d9c..f4c56675cb8 100644 --- a/bench/wtperf/config.c +++ b/bench/wtperf/config.c @@ -674,6 +674,7 @@ config_opt_usage(void) nopt = sizeof(config_opts)/sizeof(config_opts[0]); for (i = 0; i < nopt; i++) { defaultval = config_opts[i].defaultval; + typestr = "string"; switch (config_opts[i].type) { case BOOL_TYPE: typestr = "boolean"; @@ -684,7 +685,6 @@ config_opt_usage(void) break; case CONFIG_STRING_TYPE: case STRING_TYPE: - typestr = "string"; break; case INT_TYPE: typestr = "int"; |