GNOME Bugzilla – Bug 515053
gdk{events|window}-win32.c: variable is declared at middle of block
Last modified: 2008-02-07 19:25:27 UTC
Please describe the problem: 'tmp' is declared at the middle of the block in 'gdk_event_translate'. '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 gdkevents-win32.c and gdkwindow-win32.c by old compiler Actual results: Following messages are displayed.(Visual C++) gdkevents-win32.c(2823) : error C2275: 'GdkWindow' : illegal use of this type as an expression gtk¥gdk/gdktypes.h(104) : see declaration of 'GdkWindow' gdkevents-win32.c(2823) : error C2065: 'tmp' : undeclared identifier gdkevents-win32.c(2825) : error C4047: '!=' : 'int' differs in levels of indirection from 'void *' gdkevents-win32.c(2827) : error C4047: '!=' : 'GdkWindow *' differs in levels of indirection from 'int' gdkwindow-win32.c(2057) : error C2275: 'GSList' : illegal use of this type as an expression glib¥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? Revision 19463 or later Other information:
2008-02-07 Cody Russell <bratsche@gnome.org> * gdk/win32/gdkevents-win32.c * gdk/win32/gdkwindow-win32.c: Fixed two declarations in the middle of a block that were causing compile problems on old compilers. (#515053, reported by Kazuki IWAMOTO)