GNOME Bugzilla – Bug 518398
gdkwindow-win32.c: variable is declared at middle of block
Last modified: 2008-02-24 20:07:36 UTC
Please describe the problem: 'tmp' is declared at the middle of the block in '_gdk_remove_modal_window'. Old compiler will occur error, because of C99ism. Steps to reproduce: 1. compile gdkwindow-win32.c by old compiler Actual results: Following messages are displayed.(Visual C++) gdkwindow-win32.c(2057) : error C2275: 'GSList' : illegal use of this type as an expression glib/gslist.h(34) : see declaration of 'GSList' gdkwindow-win32.c(2057) : error C2065: 'tmp' : undeclared identifier gdkwindow-win32.c(2058) : error C4047: '!=' : 'int' differs in levels of indirection from 'void *' gdkwindow-win32.c(2060) : error C4047: 'function' : 'GSList *' differs in levels of indirection from 'int' Expected results: The declaration should be moved to the top of the block. Does this happen every time? GTK+ 2.12.8 Revision 19545 Other information: Plese see the following URL. http://bugzilla.gnome.org/show_bug.cgi?id=515053 The old code which was not fixed was used in the branch gtk-2-12.
2008-02-24 Cody Russell <bratsche@gnome.org> * gdk/win32/gdkwindow-win32.c: Fixed declaration in the middle of a block that was causing compile problems on old compilers. (#518398, reported by Kazuki IWAMOTO)