瀏覽代碼

COMP: Use "pragma GCC diagnostic ignored" trick to shut up python old-style-cast warnings

See http://gcc.gnu.org/onlinedocs/gcc/Diagnostic-Pragmas.html

Ideally the incriminated functions and macros should be fixed upstream ...
Jean-Christophe Fillion-Robin 15 年之前
父節點
當前提交
98551f5dfe
共有 1 個文件被更改,包括 5 次插入0 次删除
  1. 5 0
      Libs/Scripting/Python/Widgets/ctkPythonShell.cpp

+ 5 - 0
Libs/Scripting/Python/Widgets/ctkPythonShell.cpp

@@ -68,6 +68,11 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include <ctkAbstractPythonManager.h>
 #include "ctkPythonShell.h"
 
+// Disable warnings related to Python macros and functions
+// 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"
+
 //----------------------------------------------------------------------------
 class ctkPythonShellCompleter : public ctkConsoleWidgetCompleter
 {