Browse Source

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 years ago
parent
commit
98551f5dfe
1 changed files with 5 additions and 0 deletions
  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
 {