From: Michael Jeanson Date: Thu, 23 Jan 2020 16:00:08 +0000 (-0500) Subject: fix: build Python bindings with GCC10 X-Git-Tag: v2.0.1~11 X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=commitdiff_plain;h=531c3c7130821d8feff5a66623272816c04d4fab fix: build Python bindings with GCC10 Disable -Wnull-dereference for native_bt.c bt2/native_bt.c: In function ‘SWIG_Python_NewPointerObj.constprop’: bt2/native_bt.c:2207:13: error: potential null pointer dereference [-Werror=null-dereference] 2207 | PyObject *newraw = data->newraw; | ^~~~~~ Change-Id: I05db1c48304b1fbc715d273425e16d7605405b27 Signed-off-by: Michael Jeanson Reviewed-on: https://review.lttng.org/c/babeltrace/+/2852 Reviewed-by: Simon Marchi Tested-by: jenkins --- diff --git a/src/bindings/python/bt2/Makefile.am b/src/bindings/python/bt2/Makefile.am index ccd56bbb..e552d228 100644 --- a/src/bindings/python/bt2/Makefile.am +++ b/src/bindings/python/bt2/Makefile.am @@ -110,6 +110,8 @@ GENERATED_BINDINGS_DEPS = \ # Disable -Wshadow for that file. WARN_CFLAGS = -Wno-shadow +WARN_CFLAGS += -Wno-null-dereference + BUILD_FLAGS=CC="$(CC)" \ CFLAGS="$(GLIB_CFLAGS) $(AM_CFLAGS) $(CFLAGS) $(WARN_CFLAGS)" \ CPPFLAGS="$(AM_CPPFLAGS) $(CPPFLAGS) -I$(srcdir)/bt2" \