After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 518398 - gdkwindow-win32.c: variable is declared at middle of block
gdkwindow-win32.c: variable is declared at middle of block
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Backend: Win32
2.12.x
Other All
: Normal normal
: ---
Assigned To: gtk-win32 maintainers
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2008-02-24 11:47 UTC by Kazuki Iwamoto
Modified: 2008-02-24 20:07 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Kazuki Iwamoto 2008-02-24 11:47:41 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.
Comment 1 Cody Russell 2008-02-24 20:07:36 UTC
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)