From a2a88dadb5a872010fa9930d54ebae810b8f780e Mon Sep 17 00:00:00 2001 From: Keith Bostic Date: Fri, 17 Jun 2016 12:00:59 -0400 Subject: WT-2712 Coverity 1356928 and 1356929: ASSERT_SIDE_EFFECT (#2807) Coverity complains: CID 1356929: Incorrect expression (ASSERT_SIDE_EFFECT) Assignment "tablename = strchr(opts->uri, 58)" has a side effect. This code will work differently in a non-debug build. 90 testutil_assert((tablename = strchr(opts->uri, ':')) != 0); I don't see it (there aren't any #ifdefs in the path to exit), my suspicion is Coverity doesn't like side-effects in function calls named with any variant of "assert". --- test/csuite/wt2592_join_schema/main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'test/csuite/wt2592_join_schema') diff --git a/test/csuite/wt2592_join_schema/main.c b/test/csuite/wt2592_join_schema/main.c index fa6f50b12ae..a880e15767b 100644 --- a/test/csuite/wt2592_join_schema/main.c +++ b/test/csuite/wt2592_join_schema/main.c @@ -87,7 +87,8 @@ main(int argc, char *argv[]) testutil_check(testutil_parse_opts(argc, argv, opts)); testutil_make_work_dir(opts->home); - testutil_assert((tablename = strchr(opts->uri, ':')) != 0); + tablename = strchr(opts->uri, ':'); + testutil_assert(tablename != NULL); tablename++; snprintf(countryuri, sizeof(countryuri), "index:%s:country", tablename); snprintf(yearuri, sizeof(yearuri), "index:%s:year", tablename); -- cgit v1.2.1