mirror of
https://github.com/libusb/libusb
synced 2024-11-21 14:29:12 -07:00
tests/umockdev: Avoid unknown warning option on older gcc
According to https://gcc.gnu.org/wiki/StaticAnalyzer the -Wanalyzer-malloc-leak and -Wanalyzer-file-leak options came in GCC 10. When building with GCC 9 there would be warnings: CC umockdev-umockdev.o ../../libusb-git/tests/umockdev.c:37:32: error: unknown option after ‘#pragma GCC diagnostic’ kind [-Werror=pragmas] 37 | #pragma GCC diagnostic ignored "-Wanalyzer-malloc-leak" | ^~~~~~~~~~~~~~~~~~~~~~~~ ../../libusb-git/tests/umockdev.c:38:32: error: unknown option after ‘#pragma GCC diagnostic’ kind [-Werror=pragmas] 38 | #pragma GCC diagnostic ignored "-Wanalyzer-file-leak" | ^~~~~~~~~~~~~~~~~~~~~~ Closes #1369 Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
This commit is contained in:
parent
dac541dc75
commit
56cee16efd
2 changed files with 2 additions and 2 deletions
|
@ -1 +1 @@
|
|||
#define LIBUSB_NANO 11844
|
||||
#define LIBUSB_NANO 11845
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
#define UNUSED_DATA __attribute__ ((unused)) gconstpointer unused_data
|
||||
|
||||
/* avoid leak reports inside assertions; leaking stuff on assertion failures does not matter in tests */
|
||||
#if !defined(__clang__)
|
||||
#if !defined(__clang__) && __GNUC__ > 9
|
||||
#pragma GCC diagnostic ignored "-Wanalyzer-malloc-leak"
|
||||
#pragma GCC diagnostic ignored "-Wanalyzer-file-leak"
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue