Selaa lähdekoodia

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 vuotta sitten
vanhempi
commit
98551f5dfe
1 muutettua tiedostoa jossa 5 lisäystä ja 0 poistoa
  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 <ctkAbstractPythonManager.h>
 #include "ctkPythonShell.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
 class ctkPythonShellCompleter : public ctkConsoleWidgetCompleter
 {
 {