python: Ignore -Wcast-align warnings in Python 3.8 header files.

Disable this warning/error in the Python 3.8 header files:

In file included from /usr/include/python3.8/abstract.h:837,
                 from /usr/include/python3.8/Python.h:147,
                 from actions.h:31,
                 from actions-6.c:34:
/usr/include/python3.8/cpython/abstract.h: In function '_PyVectorcall_Function':
/usr/include/python3.8/cpython/abstract.h:91:11: error: cast increases required alignment of target type [-Werror=cast-align]
   91 |     ptr = (vectorcallfunc*)(((char *)callable) + offset);
      |           ^
This commit is contained in:
Richard W.M. Jones
2019-09-02 08:57:11 +01:00
parent 451e6a7b97
commit 15d1611889

View File

@@ -45,7 +45,11 @@ let rec generate_python_actions_h () =
#include \"guestfs-utils.h\"
#define PY_SSIZE_T_CLEAN 1
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored \"-Wcast-align\"
#include <Python.h>
#pragma GCC diagnostic pop
#if PY_VERSION_HEX < 0x02050000
typedef int Py_ssize_t;