Optimization problem when sending image data
s.jansen at gmail.com
Thu Aug 20 09:33:38 PDT 2009
I'm trying to send a image to the notification daemon, but somehow the
image get messed up (see attachment) whenever I turn on optimization
to -O2 or -O3. The weird thing is that it used to work, so I'm kind of
baffled why this is not working anymore.
Here's part of the code that sends the image data array. (the full
code which is not too big can be found here:
where icdata comes from;:
uint32_t * pixels = (some allocated pixel data)
const char * icdata = (const char*) (pixels);
Now just to be sure, I also tried allocating a new byte array and copy
each pixel value byte for byte to the byte array, but that didn't work
This is on a x86_64 with GCC 4.4.1
Any ideas on how I can fix or diagnose this problem?
"And any fool knows a dog needs a home
A shelter from pigs on the wing"
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 12310 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/dbus/attachments/20090820/14ce7a1b/attachment.png
More information about the dbus