summaryrefslogtreecommitdiff
path: root/test/libapt/common.h
diff options
context:
space:
mode:
authorJulian Andres Klode <julian.klode@canonical.com>2024-04-20 14:09:37 +0200
committerJulian Andres Klode <julian.klode@canonical.com>2024-04-20 14:15:47 +0200
commit4e9a9dbf9bd52d38ab5818f3eb32c8189fd25671 (patch)
tree0656de05d8d9d783d8b0c77567f986cb46c9df5f /test/libapt/common.h
parent1350ca686ba2557dd8e2c17eab367bfbfe9b389a (diff)
build: test: Silence warnings in GTest code
GTest has a lot of broken things with signed vs unsigned, and double integer promotions, let's silence them.
Diffstat (limited to 'test/libapt/common.h')
-rw-r--r--test/libapt/common.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/libapt/common.h b/test/libapt/common.h
new file mode 100644
index 000000000..d69711d50
--- /dev/null
+++ b/test/libapt/common.h
@@ -0,0 +1,11 @@
+/*
+ * GTest is a horribly broken library needing lots of diagnostic overrides,
+ * do them here.
+ */
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wdouble-promotion"
+#pragma GCC diagnostic ignored "-Wsign-promo"
+#pragma GCC diagnostic ignored "-Wsign-compare"
+#include <gtest/gtest.h>
+#pragma GCC diagnostic pop
+