Fix: python: -Wshadow warning
[lttng-tools.git] / extras / bindings / swig / python / Makefile.am
index af1daf87c1f2fc8a7e839945e6ade224586ac404..209f5bd61d4293a0c740b74ccbd4a8d22b510a11 100644 (file)
@@ -1,7 +1,16 @@
+# SPDX-License-Identifier: GPL-2.0-only
+
 lttng.i: lttng.i.in
        $(SED) "s/LTTNG_VERSION_STR/LTTng $(PACKAGE_VERSION)/g" < $(srcdir)/lttng.i.in >lttng.i
 
-AM_CFLAGS = $(PYTHON_INCLUDE) -I$(top_srcdir)/include
+# 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.
+AM_CFLAGS += -Wno-shadow
+
+AM_CPPFLAGS += $(PYTHON_INCLUDE)
 
 EXTRA_DIST = lttng.i.in
 nodist_python_PYTHON = lttng.py
This page took 0.02322 seconds and 4 git commands to generate.