Kaynağa Gözat

app_python: fixed compile warning

- warning: dereferencing type-punned pointer will break strict-aliasing
  rules
Daniel-Constantin Mierla 14 yıl önce
ebeveyn
işleme
1abde923ee
1 değiştirilmiş dosya ile 1 ekleme ve 2 silme
  1. 1 2
      modules/app_python/python_msgobj.c

+ 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;