aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattias Andrée <m@maandree.se>2026-02-23 12:00:13 +0100
committerMattias Andrée <m@maandree.se>2026-02-23 12:00:13 +0100
commitfc9e4219e5adc71fb71097c4c85e9e517adaaec1 (patch)
tree9ae7e549134d4f087469f7e1c2ad69fd22af900c
parentm fixes (diff)
downloadlibcontacts-fc9e4219e5adc71fb71097c4c85e9e517adaaec1.tar.gz
libcontacts-fc9e4219e5adc71fb71097c4c85e9e517adaaec1.tar.bz2
libcontacts-fc9e4219e5adc71fb71097c4c85e9e517adaaec1.tar.xz
Silence warningsHEAD1.0.2master
Signed-off-by: Mattias Andrée <m@maandree.se>
-rw-r--r--test.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/test.c b/test.c
index 1678540..c0bc0cf 100644
--- a/test.c
+++ b/test.c
@@ -2,6 +2,10 @@
#include "common.h"
#include <stdarg.h>
+#if defined(__GNUC__)
+# pragma GCC diagnostic ignored "-Wunsuffixed-float-constants"
+#endif
+
#define TEST(EXPR)\
do {\
@@ -113,6 +117,11 @@ main(void)
struct passwd user;
char *s, **ids;
+#if defined(__GNUC__)
+# pragma GCC diagnostic push
+# pragma GCC diagnostic ignored "-Wdiscarded-qualifiers"
+#endif
+
TEST(libcontacts_get_path("", NULL) == NULL && errno == EINVAL);
memset(&user, 0, sizeof(user));
TEST(libcontacts_get_path("", &user) == NULL && errno == EINVAL);
@@ -132,6 +141,10 @@ main(void)
TEST(!mkdir(".testdir/.config", 0700));
TEST(!mkdir(".testdir/.config/contacts", 0700));
+#if defined(__GNUC__)
+# pragma GCC diagnostic pop
+#endif
+
touch(".testdir/.config/contacts/alpha");
touch(".testdir/.config/contacts/.me");
touch(".testdir/.config/contacts/.nobody");