diff options
-rw-r--r-- | tests/gtests/blenlib/BLI_listbase_test.cc | 10 | ||||
-rw-r--r-- | tests/gtests/blenlib/BLI_path_util_test.cc | 3 |
2 files changed, 8 insertions, 5 deletions
diff --git a/tests/gtests/blenlib/BLI_listbase_test.cc b/tests/gtests/blenlib/BLI_listbase_test.cc index 76d173c9604..e5919c5dfb1 100644 --- a/tests/gtests/blenlib/BLI_listbase_test.cc +++ b/tests/gtests/blenlib/BLI_listbase_test.cc @@ -16,8 +16,10 @@ extern "C" { static bool listbase_is_valid(const ListBase *listbase) { #define TESTFAIL(test) \ - if (!(test)) \ - goto fail; + if (!(test)) { \ + goto fail; \ + } \ + ((void)0) if (listbase->first) { const Link *prev, *link; @@ -31,14 +33,14 @@ static bool listbase_is_valid(const ListBase *listbase) link = (Link *)listbase->first; do { TESTFAIL(link->prev == prev); - } while ((prev = link), (link = link->next)); + } while ((void)(prev = link), (link = link->next)); TESTFAIL(prev == listbase->last); prev = NULL; link = (Link *)listbase->last; do { TESTFAIL(link->next == prev); - } while ((prev = link), (link = link->prev)); + } while ((void)(prev = link), (link = link->prev)); TESTFAIL(prev == listbase->first); } else { diff --git a/tests/gtests/blenlib/BLI_path_util_test.cc b/tests/gtests/blenlib/BLI_path_util_test.cc index 0bdaa346428..2b47995095a 100644 --- a/tests/gtests/blenlib/BLI_path_util_test.cc +++ b/tests/gtests/blenlib/BLI_path_util_test.cc @@ -474,7 +474,8 @@ TEST(path_util, SplitDirfile) BLI_path_frame_strip(path, ext); \ EXPECT_STREQ(path, expect_path); \ EXPECT_STREQ(ext, expect_ext); \ - } + } \ + ((void)0) /* BLI_path_frame_strip */ TEST(path_util, PathFrameStrip) |