2
0
Эх сурвалжийг харах

app_python: fixed compile warning

- warning: dereferencing type-punned pointer will break strict-aliasing
  rules
Daniel-Constantin Mierla 14 жил өмнө
parent
commit
1abde923ee

+ 1 - 2
modules/app_python/python_msgobj.c

@@ -526,8 +526,7 @@ static PyTypeObject MSGtype = {
 int
 python_msgobj_init(void)
 {
-
-    Py_TYPE(&MSGtype) = &PyType_Type;
+    Py_TYPE((void*)(&MSGtype)) = &PyType_Type;
     if (PyType_Ready(&MSGtype) < 0)
         return -1;
     return 0;