| Summary: |
Condition always tests false |
| Product: |
xorg
|
Reporter: |
Mike A. Harris <mharris> |
| Component: |
App/xkbcomp | Assignee: |
Xorg Project Team <xorg-team> |
| Status: |
RESOLVED
FIXED
|
QA Contact: |
Xorg Project Team <xorg-team> |
| Severity: |
normal
|
|
|
| Priority: |
high
|
CC: |
esigra
|
| Version: |
7.1 (2006.05) | |
|
| Hardware: |
x86 (IA32) | |
|
| OS: |
Linux (All) | |
|
| Whiteboard: |
|
|
i915 platform:
|
|
i915 features:
|
|
| Bug Depends on: |
|
|
|
| Bug Blocks: |
10101
|
|
|
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.
xkbcomp contains a bug detected by gcc: compat.c:249: warning: comparison is always false due to limited range of data type static Bool AddGroupCompat(CompatInfo *info,unsigned group,GroupCompatInfo *newGC) { GroupCompatInfo * gc; unsigned merge; merge= newGC->merge; gc= &info->groupCompat[group]; if ((newGC->fileID<0)|| /* This is line 249 */ ((gc->real_mods==newGC->real_mods)&&(gc->vmods==newGC->vmods))) { return True; } if (((gc->fileID==newGC->fileID)&&(warningLevel>0))||(warningLevel>9)) { WARN1("Compat map for group %d redefined\n",group+1); ACTION1("Using %s definition\n",(merge==MergeAugment?"old":"new")); } if (merge!=MergeAugment) *gc= *newGC; return True; } The "if ((newGC->fileID<0)" test is always false because the fileID member of the GroupCompatInfo struct is an unsigned char, so it can never be less than zero.