mirror of
https://github.com/morgan9e/systemd
synced 2026-04-14 00:14:32 +09:00
meson: handle bool-compare warning as error
Then we can detect the error fixed by the previous commit like the following:
../src/libsystemd/sd-device/test-sd-device.c: In function ‘test_sd_device_enumerator_add_all_parents’:
../src/shared/tests.h:225:51: error: comparison of constant ‘0’ with boolean expression is always true [-Werror=bool-compare]
225 | #define ASSERT_OK(expr) __coverity_check__((expr) >= 0)
| ^~
../src/libsystemd/sd-device/test-sd-device.c:547:9: note: in expansion of macro ‘ASSERT_OK’
547 | ASSERT_OK(sd_device_enumerator_add_all_parents(e) >= 0);
| ^~~~~~~~~
This commit is contained in:
@@ -379,6 +379,7 @@ possible_common_cc_flags = [
|
||||
'-Warray-bounds=2',
|
||||
'-Wdate-time',
|
||||
'-Wendif-labels',
|
||||
'-Werror=bool-compare',
|
||||
'-Werror=discarded-qualifiers',
|
||||
'-Werror=format=2',
|
||||
'-Werror=format-signedness',
|
||||
|
||||
Reference in New Issue
Block a user