Eliminate use of empty struct in test code

Where GCC and Clang issue warnings such as "empty struct is a GNU extension"
(with `-Wgnu-empty-struct`) or "empty struct has size 0 in C, size 1 in C++"
(with `-Wc++-compat`), MSVC issues an error C2016 "C requires that a struct
or union has at least one member".
This commit is contained in:
Mike Gelfand 2018-03-31 15:21:36 +03:00
parent a0d3adb693
commit b8f1802522

View File

@ -54,7 +54,9 @@ CTEST2(memtest, test2) {
} }
CTEST_DATA(fail) {}; CTEST_DATA(fail) {
int unused;
};
// Asserts can also be used in setup/teardown functions // Asserts can also be used in setup/teardown functions
CTEST_SETUP(fail) { CTEST_SETUP(fail) {