Bug 70803

Summary: libX11-1.6.1/src/xcms/cmsColNm.c:317: possible bad if test ?
Product: xorg Reporter: dcb314
Component: Lib/XlibAssignee: Alan Coopersmith <alan.coopersmith>
Status: RESOLVED FIXED QA Contact: Xorg Project Team <xorg-team>
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: Other   
OS: All   
i915 platform: i915 features:

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
Comment 3 Alan Coopersmith 2013-10-25 18:24:07 UTC
Fix pushed to Xlib master repo for next release:

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.