Skip to content

Commit

Permalink
app_python: fix compiler warning
Browse files Browse the repository at this point in the history
>    Add "-fno-strict-aliasing" to compilation flags
>
>    Fixes a slew of:
>      "dereferencing type-punned pointer will break strict-aliasing rules"
>    warnings from GCC for lines of the form:
>      Py_INCREF(Py_True);
>    and
>      Py_INCREF(Py_False);
>
>    due to the cast from PyIntObject* to PyObject*
>
>    GCC is technically correct here; see:
>      http://www.python.org/dev/peps/pep-3123/
>    though this is unlikely to lead to non-working machine code.
  • Loading branch information
linuxmaniac committed Jan 12, 2017
1 parent 3a81cd7 commit 982cc45
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/modules/app_python/Makefile
Expand Up @@ -22,6 +22,8 @@ ifeq ($(OS), freebsd)
LIBS+=-pthread
endif

# python2 https://www.python.org/dev/peps/pep-3123/
DEFS+=-fno-strict-aliasing
DEFS+=-I${PYTHON_INCDIR}
DEFS+=-DKAMAILIO_MOD_INTERFACE

Expand Down

0 comments on commit 982cc45

Please sign in to comment.