Bug 70803 - libX11-1.6.1/src/xcms/cmsColNm.c:317: possible bad if test ?
Summary: libX11-1.6.1/src/xcms/cmsColNm.c:317: possible bad if test ?
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Lib/Xlib (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Alan Coopersmith
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-10-23 17:00 UTC by dcb314
Modified: 2013-10-25 18:24 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description dcb314 2013-10-23 17:00:30 UTC
I just compiled X11 on Linux with the extra compiler flag -Wlogical-op

It said

cmsColNm.c:317:2: warning: logical 'or' of collectively exhaustive tests is always true [-Wlogical-op]

Source code is 

    if ((*pBuf != '\n') || (*pBuf != '\0')) {

Suggest replace || with &&
Comment 1 Alan Coopersmith 2013-10-23 17:48:07 UTC
Uh, yeah, that can't ever have worked, we should fix that.
Comment 2 Alan Coopersmith 2013-10-24 06:16:01 UTC
http://patchwork.freedesktop.org/patch/15003/
Comment 3 Alan Coopersmith 2013-10-25 18:24:07 UTC
Fix pushed to Xlib master repo for next release:
http://cgit.freedesktop.org/xorg/lib/libX11/commit/?id=6cb02b166361200da35ba14f52cd9aaa493eb0ea

Thanks for reporting this to us!


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.