mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-22 07:03:38 +00:00
Limit GCC 6 pragmas.
-Wnull-dereference and -Wshift-overflow are new warnings in GCC 6, so do
not try to disable them with pragmas on older GCC versions.
Fixes commit a8e15ea924.
This commit is contained in:
@@ -31,7 +31,9 @@
|
||||
/* GCC can't work out that the YAJL_IS_<foo> test is sufficient to
|
||||
* ensure that YAJL_GET_<foo> later doesn't return NULL.
|
||||
*/
|
||||
#if defined(__GNUC__) && __GNUC__ >= 6 /* gcc >= 6 */
|
||||
#pragma GCC diagnostic ignored "-Wnull-dereference"
|
||||
#endif
|
||||
|
||||
#define Val_none (Val_int (0))
|
||||
|
||||
|
||||
@@ -990,7 +990,9 @@ do_internal_rhbz914931 (int count)
|
||||
}
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
#if defined(__GNUC__) && GUESTFS_GCC_VERSION >= 60000 /* gcc >= 6 */
|
||||
#pragma GCC diagnostic ignored "-Wnull-dereference"
|
||||
#endif
|
||||
|
||||
static void
|
||||
deliberately_cause_a_segfault (void)
|
||||
|
||||
@@ -35,7 +35,9 @@
|
||||
/* GCC can't work out that the YAJL_IS_<foo> test is sufficient to
|
||||
* ensure that YAJL_GET_<foo> later doesn't return NULL.
|
||||
*/
|
||||
#if defined(__GNUC__) && GUESTFS_GCC_VERSION >= 60000 /* gcc >= 6 */
|
||||
#pragma GCC diagnostic ignored "-Wnull-dereference"
|
||||
#endif
|
||||
|
||||
GUESTFSD_EXT_CMD(str_ldmtool, ldmtool);
|
||||
|
||||
|
||||
@@ -69,7 +69,9 @@
|
||||
/* errors in <gtk.h> */
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wstrict-prototypes"
|
||||
#if defined(__GNUC__) && __GNUC__ >= 6 /* gcc >= 6 */
|
||||
#pragma GCC diagnostic ignored "-Wshift-overflow"
|
||||
#endif
|
||||
#include <gtk/gtk.h>
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
|
||||
@@ -36,7 +36,9 @@
|
||||
/* errors in <gtk.h> */
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wstrict-prototypes"
|
||||
#if defined(__GNUC__) && __GNUC__ >= 6 /* gcc >= 6 */
|
||||
#pragma GCC diagnostic ignored "-Wshift-overflow"
|
||||
#endif
|
||||
#include <gtk/gtk.h>
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
|
||||
Reference in New Issue
Block a user