mirror of
https://github.com/shadps4-emu/ext-libusb.git
synced 2026-01-31 00:55:21 +01: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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user