1 From 377b11c0255d717912f585e7c16c6c053e6cc913 Mon Sep 17 00:00:00 2001
2 From: "Sar Ashki, Babak" <Babak.SarAshki@windriver.com>
3 Date: Thu, 23 Jan 2020 07:02:11 +0000
4 Subject: [PATCH] pragma ignore cast type errors with gcc 8.3
8 plugins/python/uwsgi_pymodule.c | 4 +++-
9 2 files changed, 5 insertions(+), 1 deletion(-)
11 diff --git a/core/emperor.c b/core/emperor.c
12 index 97596556..d64110cb 100644
15 @@ -988,7 +988,9 @@ int uwsgi_emperor_vassal_start(struct uwsgi_instance *n_ui) {
16 #if defined(__linux__) && !defined(OBSOLETE_LINUX_KERNEL) && !defined(__ia64__)
17 if (uwsgi.emperor_clone) {
18 char stack[PTHREAD_STACK_MIN];
19 +#pragma GCC diagnostic ignored "-Wcast-function-type"
20 pid = clone((int (*)(void *)) uwsgi_emperor_spawn_vassal, stack + PTHREAD_STACK_MIN, SIGCHLD | uwsgi.emperor_clone, (void *) n_ui);
21 +#pragma GCC diagnostic error "-Wcast-function-type"
25 diff --git a/plugins/python/uwsgi_pymodule.c b/plugins/python/uwsgi_pymodule.c
26 index d3075897..ac3ccb89 100644
27 --- a/plugins/python/uwsgi_pymodule.c
28 +++ b/plugins/python/uwsgi_pymodule.c
30 #include "uwsgi_python.h"
31 +#pragma GCC diagnostic ignored "-Wcast-function-type"
33 extern struct uwsgi_server uwsgi;
34 extern struct uwsgi_python up;
35 @@ -2553,6 +2554,7 @@ PyObject *py_uwsgi_parse_file(PyObject * self, PyObject * args) {
38 static PyMethodDef uwsgi_spooler_methods[] = {
41 {"send_to_spooler", (PyCFunction) py_uwsgi_send_spool, METH_VARARGS | METH_KEYWORDS, ""},
42 {"spool", (PyCFunction) py_uwsgi_send_spool, METH_VARARGS | METH_KEYWORDS, ""},
43 @@ -2569,7 +2571,6 @@ static PyMethodDef uwsgi_spooler_methods[] = {
48 PyObject *py_uwsgi_suspend(PyObject * self, PyObject * args) {
50 struct wsgi_request *wsgi_req = py_current_wsgi_req();
51 @@ -3918,3 +3919,4 @@ void init_uwsgi_module_snmp(PyObject * current_uwsgi_module) {
53 uwsgi_log( "SNMP python functions initialized.\n");
55 +#pragma GCC diagnostic error "-Wcast-function-type"