From 531c3c7130821d8feff5a66623272816c04d4fab Mon Sep 17 00:00:00 2001 From: Michael Jeanson Date: Thu, 23 Jan 2020 11:00:08 -0500 Subject: [PATCH] fix: build Python bindings with GCC10 MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- src/bindings/python/bt2/Makefile.am | 2 ++ 1 file changed, 2 insertions(+) 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" \ -- 2.34.1