diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2011-01-05 16:12:42 -0800 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2011-01-05 16:12:42 -0800 |
commit | 611f20e896aa533f0f3e5cd6c8fdd7c381963c95 (patch) | |
tree | 69d9f29993a1a64877b15363f171813e9bd51371 /src/parse.c | |
parent | b160f7bcb99111e631d6701b199f1dad1e40c80d (diff) |
Fix many gcc strict-aliasing warnings
menus.c:518: warning: dereferencing type-punned pointer will break strict-aliasing rules
and many more of the same message at different lines
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'src/parse.c')
-rw-r--r-- | src/parse.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/parse.c b/src/parse.c index 1e2c6cb..1831d39 100644 --- a/src/parse.c +++ b/src/parse.c @@ -949,16 +949,19 @@ put_pixel_on_root(Pixel pixel) Atom pixelAtom, retAtom; int retFormat; unsigned long nPixels, retAfter; - Pixel *retProp; + unsigned char*retProp; + Pixel *pixelProp; pixelAtom = XInternAtom(dpy, "_MIT_PRIORITY_COLORS", True); XGetWindowProperty(dpy, Scr->Root, pixelAtom, 0, 8192, False, XA_CARDINAL, &retAtom, &retFormat, &nPixels, &retAfter, - (unsigned char **)&retProp); + &retProp); + pixelProp = (Pixel *) retProp; for (i=0; i< nPixels; i++) - if (pixel == retProp[i]) addPixel = 0; - + if (pixel == pixelProp[i]) + addPixel = 0; + if (addPixel) XChangeProperty (dpy, Scr->Root, _XA_MIT_PRIORITY_COLORS, XA_CARDINAL, 32, PropModeAppend, |