Re: shmctl03: Fix 32-bit compat mode failure by adjusting comparisons for compat mode truncation
Andrea Cervesato via ltp <[email protected]>
| Newsgroups | gmane.linux.ltp |
|---|---|
| Message-ID | <[email protected]> |
Hi Wei, > > #define TST_ASSERT_ULONG(path, val, ...) \ > > tst_assert_ulong(__FILE__, __LINE__, path, val, (0, ##__VA_ARGS__)) > > Could this avoid the comma expression? When a flag is supplied, its left-hand > operand triggers -Wunused-value, so all three new compat-mode assertions emit > compiler warnings and builds using -Werror fail. Making the flags argument > explicit and passing 0 at no-flag call sites, or dispatching separate two- and > three-argument macro forms, would avoid the warning. This is correct, we can use TST_2_ which is our default way to avoid these issues. #define TST_ASSERT_ULONG(path, val, ...) \ tst_assert_ulong(__FILE__, __LINE__, path, val, \ TST_2_(dummy, ##__VA_ARGS__, 0)) -- Andrea Cervesato SUSE QE Automation Engineer Linux andrea.cervesato-IBi9RG/[email protected] -- Mailing list info: https://lists.linux.it/listinfo/ltp