Pārlūkot izejas kodu

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 gadi atpakaļ
vecāks
revīzija
98551f5dfe
1 mainītis faili ar 5 papildinājumiem un 0 dzēšanām
  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
 {