]> arthur.barton.de Git - bup.git/commitdiff
Avoid readline.h -Wstrict-prototype induced failures
authorRob Browning <rlb@defaultvalue.org>
Sun, 21 Jun 2020 16:50:30 +0000 (11:50 -0500)
committerRob Browning <rlb@defaultvalue.org>
Sun, 5 Jul 2020 16:16:23 +0000 (11:16 -0500)
On some platforms -Wstrict-prototype is now the default, and readline
includes prototypes like "int foo()" rather than "int foo(void)", so
for now, just suppress those warnings for the readline includes.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
lib/bup/_helpers.c

index 009c96e710ca8117e05d6774b61a8c149e149a3b..b2eb7819a3fe4b2ab65aa09e7d2b583cf1ce6c11 100644 (file)
 #endif
 
 #ifdef BUP_HAVE_READLINE
-#include <readline/readline.h>
-#include <readline/history.h>
+# pragma GCC diagnostic push
+# pragma GCC diagnostic ignored "-Wstrict-prototypes"
+# include <readline/readline.h>
+# include <readline/history.h>
+# pragma GCC diagnostic pop
 #endif
 
 #include "bupsplit.h"