From: Sebastian Harl Date: Sun, 23 Feb 2014 04:25:56 +0000 (-0800) Subject: store_lookup_test: Continue loop after fail(). X-Git-Tag: sysdb-0.1.0~185 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=c3e8f5c67376283d56e082c34f7c477867517dca;p=sysdb.git store_lookup_test: Continue loop after fail(). The compiler does not know that fail aborts the test program and clang (correctly) complains that the variable ('m' in this case) might be used uninitialized afterwards. --- diff --git a/t/core/store_lookup_test.c b/t/core/store_lookup_test.c index 48bb483..74274f8 100644 --- a/t/core/store_lookup_test.c +++ b/t/core/store_lookup_test.c @@ -293,8 +293,10 @@ START_TEST(test_store_match_op) else if (! strcmp(golden_data[i].op, "AND")) m = sdb_store_con_matcher(golden_data[i].left, golden_data[i].right); - else + else { fail("INTERNAL ERROR: unexpected operator %s", golden_data[i].op); + continue; + } #define TO_NAME(v) (((v) == always) ? "always" \ : ((v) == never) ? "never" : "")