Fix -Wshadow warnings
[babeltrace.git] / src / bindings / python / bt2 / Makefile.am
index e97213455918ec2dccb212ee1942f370beebe537..cc0ded098e8638f9254f9b31e2e72bcfbebadbae 100644 (file)
@@ -101,8 +101,15 @@ GENERATED_BINDINGS_DEPS =  \
        bt2/version.py          \
        setup.py
 
+# Some versions of SWIG (like 3.0.12) generate code where a parameter called
+# `swig_this` shadows a global of the same name.  Later versions (like 4.0.1)
+# have renamed this global to `Swig_This_global`.
+#
+# Disable -Wshadow for that file.
+WARN_CFLAGS = -Wno-shadow
+
 BUILD_FLAGS=CC="$(CC)" \
-               CFLAGS="$(GLIB_CFLAGS) $(AM_CFLAGS) $(CFLAGS)" \
+               CFLAGS="$(GLIB_CFLAGS) $(AM_CFLAGS) $(CFLAGS) $(WARN_CFLAGS)" \
                CPPFLAGS="$(AM_CPPFLAGS) $(CPPFLAGS) -I$(srcdir)/bt2" \
                LDFLAGS="$(AM_LDFLAGS) $(LDFLAGS) $(GLIB_LIBS) $(LIBS)"
 
@@ -160,4 +167,9 @@ uninstall-local:
 EXTRA_DIST = $(STATIC_BINDINGS_DEPS) $(SWIG_INTERFACE_FILES) $(STATIC_NATIVE_LIB_SRCS)
 
 # clean: generated C and Python files (by SWIG)
-CLEANFILES = bt2/native_bt.py bt2/native_bt.c build-python-bindings.stamp copy-static-deps.stamp
+CLEANFILES = \
+       build-python-bindings.stamp \
+       bt2/native_bt.c \
+       bt2/native_bt.d \
+       bt2/native_bt.py \
+       copy-static-deps.stamp
This page took 0.024092 seconds and 4 git commands to generate.