WineHQ
Wine Forums

Board index » WineHQ » Wine Help




 Page 1 of 1 [ 6 posts ] 



 
Author Message
 Post Posted: Fri Jul 23, 2010 10:52 pm 
Offline
Level 2
Level 2

Joined: Sat May 10, 2008 8:23 am
Posts: 49
Location: Krefeld
I got the following compiler error with Wine 1.2-GIT (up-to-date checkout):
Code:
make[1]: Entering directory `/home/quix0r/git/wine/dlls/user32'
ccache gcc -m32 -c -I. -I. -I../../include -I../../include  -D__WINESRC__ -D_USER32_ -D_WINABLE_ -D_REENTRANT -fPIC -Wall -pipe -fno-strict-aliasing -Wdeclaration-after-statement -Wstrict-prototypes -Wtype-limits -Wwrite-strings -Wpointer-arith  -g -O0 -fPIC  -o painting.o painting.c
painting.c: In function ‘GetDCEx’:
painting.c:913: error: initializer element is not constant
make[1]: *** [painting.o] Error 1
make[1]: Leaving directory `/home/quix0r/git/wine/dlls/user32'
make: *** [dlls/user32] Error 2

It happens only with last commit, the previous one, previous day, does compile flawless.

Please help here. :)

Roland


Top 
 Post subject:
 Post Posted: Sat Jul 24, 2010 12:07 am 
Offline
Level 3
Level 3

Joined: Fri Oct 16, 2009 10:27 am
Posts: 99
Location: Hungary
It compiles without errors for me when using CFLAGS="-O2", instead of -O0.


Top 
 Post Posted: Sat Jul 24, 2010 1:43 am 
 
On Sat, Jul 24, 2010 at 05:52, Quix0r <wineforum-user@winehq.org> wrote:
Quote:
I got the following compiler error with Wine 1.2-GIT (up-to-date checkout):

Code:
make[1]: Entering directory `/home/quix0r/git/wine/dlls/user32'
ccache gcc -m32 -c -I. -I. -I../../include -I../../include  -D__WINESRC__ -D_USER32_ -D_WINABLE_ -D_REENTRANT -fPIC -Wall -pipe -fno-strict-aliasing -Wdeclaration-after-statement -Wstrict-prototypes -Wtype-limits -Wwrite-strings -Wpointer-arith  -g -O0 -fPIC  -o painting.o painting.c
painting.c: In function ‘GetDCEx’:
painting.c:913: error: initializer element is not constant
make[1]: *** [painting.o] Error 1
make[1]: Leaving directory `/home/quix0r/git/wine/dlls/user32'
make: *** [dlls/user32] Error 2


It happens only with last commit, the previous one, previous day, does compile flawless.

Please help here. :)

Roland

I've the same problem here (as other people).

Just wait for Monday commit batch... it will hopefully be fixed by
then (or the misbehaving patch reverted)


Top 
 Post subject:
 Post Posted: Mon Jul 26, 2010 1:11 pm 
Offline
Level 2
Level 2

Joined: Sat May 10, 2008 8:23 am
Posts: 49
Location: Krefeld
Here is my patch to get it compiling even with -O0 (and what does have optimization to do with errors?):
Code:
diff --git a/dlls/user32/painting.c b/dlls/user32/painting.c
index 5e57e7f..320a920 100644
--- a/dlls/user32/painting.c
+++ b/dlls/user32/painting.c
@@ -910,7 +910,7 @@ BOOL WINAPI EndPaint( HWND hwnd, const PAINTSTRUCT *lps )
 HDC WINAPI GetDCEx( HWND hwnd, HRGN hrgnClip, DWORD flags )
 {
     static const DWORD clip_flags = DCX_PARENTCLIP | DCX_CLIPSIBLINGS | DCX_CLIPCHILDREN | DCX_WINDOW;
-    static const DWORD user_flags = clip_flags | DCX_NORESETATTRS; /* flags that can be set by user */
+    static const DWORD user_flags = DCX_PARENTCLIP | DCX_CLIPSIBLINGS | DCX_CLIPCHILDREN | DCX_WINDOW | DCX_NORESETATTRS; /* f
     struct dce *dce;
     BOOL bUpdateVisRgn = TRUE;
     HWND parent;


Top 
 Post subject:
 Post Posted: Mon Jul 26, 2010 1:13 pm 
Offline
Level 2
Level 2

Joined: Sat May 10, 2008 8:23 am
Posts: 49
Location: Krefeld
I know it looks silly and I know that the original coder wants to avoid such bad-style code but for my very basic knowledge in C/C++ it works.


Top 
 Post Posted: Mon Jul 26, 2010 9:06 pm 
 
Quix0r wrote:
Quote:
I know it looks silly and I know that the original coder wants to avoid such bad-style code but for my very basic knowledge in C/C++ it works.


If you grab today's git release this should be fixed.

I did not do the fix, but I noticed it.

James McKenzie


Top 
Display posts from previous:  Sort by  
 
 Page 1 of 1 [ 6 posts ] 




Board index » WineHQ » Wine Help


Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 7 guests

 
 

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: