Bug #19218 MGRTTableEditor.cc incorrectly tests for GTK_VERSION_GE(2,4)
Submitted: 20 Apr 2006 11:57 Modified: 21 Apr 2006 15:35
Reporter: John Yodsnukis (Basic Quality Contributor) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench Preview Severity:S2 (Serious)
Version:1.0.5beta svn revision 1235 OS:Linux (Linux (Gentoo on PPC))
Assigned to: CPU Architecture:Any

[20 Apr 2006 11:57] John Yodsnukis
Description:
#ifdef GTK_VERSION_GE(2,4)

throws a warning about extraneous parameters.  See fix below.

How to repeat:
Try to compile MGRTTableEditor.cc

Suggested fix:
--- mysql-workbench-svn/mysql-gui-common/source/linux/MySQLGRT/MGRTTableEditor.cc	(revision 1235)
+++ mysql-workbench-svn/mysql-gui-common/source/linux/MySQLGRT/MGRTTableEditor.cc	(working copy)
@@ -19,7 +19,11 @@
 #include "myg_gtkutils.h"
 #include "MGGladeXML.h"
 
-#ifdef GTK_VERSION_GE(2,4)
+#ifndef GTK_MAJOR_VERSION
+#include <gtk/gtk.h>
+#endif
+
+#if GTK_VERSION_GE(2,4)
 #define HAS_COMBO_CELL
 #endif
[20 Apr 2006 14:44] John Yodsnukis
Verbatim message is:

MySQLGRT/MGRTTableEditor.cc:22:22: warning: extra tokens at end of #ifdef directive
[21 Apr 2006 15:35] John Yodsnukis
I'm closing this since the test is now removed.  However, it *was* a bug.