]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
journal/fsprg: set -Wno-pointer-arithm only for that file
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sat, 22 Apr 2017 22:49:49 +0000 (18:49 -0400)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 24 Apr 2017 01:47:26 +0000 (21:47 -0400)
Both gcc and clang issue a host of warnings about void pointers used in
arithmetic. The warning must be ignored in that file to avoid multiple
warnings.

Makefile.am used to set this for all libsystemd-journal-internal.a sources,
because there's no finer granularity for warnings. Let's just set it for
this one file.

Makefile.am
src/journal/fsprg.c

index 4ba230569a60f9dc5c1212500a6d6e92071dd8bd..e362060326057de0a432ea4839a665d70a7abf65 100644 (file)
@@ -4556,10 +4556,8 @@ libsystemd_journal_internal_la_SOURCES += \
 libsystemd_journal_internal_la_LIBADD += \
        $(GCRYPT_LIBS)
 
-# fsprg.c is a drop-in file using void pointer arithmetic
 libsystemd_journal_internal_la_CFLAGS += \
-       $(GCRYPT_CFLAGS) \
-       -Wno-pointer-arith
+       $(GCRYPT_CFLAGS)
 endif
 
 noinst_LTLIBRARIES += \
index 612b10f3a9afea1d90614b825680cf6b32052a61..e7c22880be65411a738c904f0e12586bb96f6767 100644 (file)
@@ -40,6 +40,9 @@
 #define RND_GEN_Q 0x02
 #define RND_GEN_X 0x03
 
+#pragma GCC diagnostic ignored "-Wpointer-arith"
+/* TODO: remove void* arithmetic and this work-around */
+
 /******************************************************************************/
 
 static void mpi_export(void *buf, size_t buflen, const gcry_mpi_t x) {