浏览代码

ctkAbstractPythonManager - Suppress "old-style cast" warning using #pragma

Note: Ideally the incriminated functions and macros should be
fixed upstream ..
Jean-Christophe Fillion-Robin 14 年之前
父节点
当前提交
7b258186d3
共有 1 个文件被更改,包括 7 次插入0 次删除
  1. 7 0
      Libs/Scripting/Python/Core/ctkAbstractPythonManager.cpp

+ 7 - 0
Libs/Scripting/Python/Core/ctkAbstractPythonManager.cpp

@@ -32,6 +32,13 @@
 // STD includes
 #include <csignal>
 
+#ifdef __GNUC__
+// Disable warnings related to signal() function
+// See http://gcc.gnu.org/onlinedocs/gcc/Diagnostic-Pragmas.html
+// Note: Ideally the incriminated functions and macros should be fixed upstream ...
+#pragma GCC diagnostic ignored "-Wold-style-cast"
+#endif
+
 #ifdef CTK_PYTHONQT_WRAP_QTGUI
 void PythonQt_init_QtGui(PyObject*);
 #endif