Quellcode durchsuchen

COMP: Embed Gcc specific pragma in #ifdef __GCC__ to avoid complaints from other compiler

Jean-Christophe Fillion-Robin vor 15 Jahren
Ursprung
Commit
5065f572e9
1 geänderte Dateien mit 2 neuen und 0 gelöschten Zeilen
  1. 2 0
      Libs/Scripting/Python/Widgets/ctkPythonShell.cpp

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

@@ -68,10 +68,12 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include <ctkAbstractPythonManager.h>
 #include "ctkPythonShell.h"
 
+#ifdef __GNUC__
 // 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"
+#endif
 
 //----------------------------------------------------------------------------
 class ctkPythonShellCompleter : public ctkConsoleWidgetCompleter