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 515053 - gdk{events|window}-win32.c: variable is declared at middle of block
gdk{events|window}-win32.c: variable is declared at middle of block
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Backend: Win32
unspecified
Other All
: Normal normal
: ---
Assigned To: gtk-win32 maintainers
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2008-02-07 19:11 UTC by Kazuki Iwamoto
Modified: 2008-02-07 19:25 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Kazuki Iwamoto 2008-02-07 19:11:20 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:
Comment 1 Cody Russell 2008-02-07 19:25:17 UTC
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)