GNOME Bugzilla – Bug 526021
gtkprintoperation-win32.c: variable is declared at middle of block
Last modified: 2008-04-03 17:59:27 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:
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)