We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 1801 - typo in the xcf decoder, condition is always false
Summary: typo in the xcf decoder, condition is always false
Status: RESOLVED FIXED
Alias: None
Product: SDL_image
Classification: Unclassified
Component: misc (show other bugs)
Version: unspecified
Hardware: All All
: P2 normal
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-04-13 05:26 UTC by blaffablaffa
Modified: 2013-04-17 04:46 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description blaffablaffa 2013-04-13 05:26:12 UTC
I'm compiling sdl_image with clang, and it gives this warning:

IMG_xcf.c:523:28: warning: use of logical '&&' with constant operand [-Wconstant-logical-operand]
   l = (Uint8)(0.2990 * ((a && 0x00FF0000) >> 16)

This is of course always false, because (a && 0x00FF0000) is '1', so if shifted gives always 0. There are a couple of other similar issues in the same file.
Comment 1 Sam Lantinga 2013-04-17 04:46:19 UTC
Fixed, thanks!
http://hg.libsdl.org/SDL_image/rev/ce8091caddf3