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 526021 - gtkprintoperation-win32.c: variable is declared at middle of block
gtkprintoperation-win32.c: variable is declared at middle of block
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Printing
2.13.x
Other Windows
: Normal normal
: ---
Assigned To: gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2008-04-03 17:55 UTC by Kazuki Iwamoto
Modified: 2008-04-03 17:59 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Kazuki Iwamoto 2008-04-03 17:55:29 UTC
Please describe the problem:
'dc' is declared at the middle of the block in '_gtk_print_operation_platform_backend_preview_end_page'.
Old compiler will occur error, because of C99ism.

Steps to reproduce:
1. compile gtkprintoperation-win32.c by old compiler

Actual results:
Following messages are displayed.(Visual C++)
gtkprintoperation-win32.c(1715) : error C2275: 'HDC' : illegal use of this type as an expression
        windef.h(260) : see declaration of 'HDC'
gtkprintoperation-win32.c(1715) : error C2146: syntax error : missing ';' before identifier 'dc'
gtkprintoperation-win32.c(1715) : error C2065: 'dc' : undeclared identifier
gtkprintoperation-win32.c(1715) : error C4047: '=' : 'int' differs in levels of indirection from 'HDC'
gtkprintoperation-win32.c(1716) : error C4047: 'function' : 'HDC' 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 19955

Other information:
Comment 1 Cody Russell 2008-04-03 17:59:27 UTC
Committed fix to revision 19974.


2008-04-03  Cody Russell  <bratsche@gnome.org>

        * gtk/gtkprintoperation-win32.c: Fix variable declared in the middle
        of the block. (#526021, reported by Kazuki IWAMOTO)