diff options
author | Adam Jackson <ajax@redhat.com> | 2016-04-08 11:24:50 -0400 |
---|---|---|
committer | Adam Jackson <ajax@redhat.com> | 2016-04-29 11:19:58 -0400 |
commit | a5dd7b890f4f3a5245639591c73303c5a087b38a (patch) | |
tree | de5f14cdb68b3bca619aa5670dcd01c7175608f8 | |
parent | 23dfa017298ceceac818f83779858e490c7757b6 (diff) |
dix: Squash some new gcc6 warnings
-Wlogical-op now tells us:
devices.c:1685:23: warning: logical ‘and’ of equal expressions
Reviewed-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Adam Jackson <ajax@redhat.com>
-rw-r--r-- | Xext/panoramiXprocs.c | 4 | ||||
-rw-r--r-- | Xext/saver.c | 2 | ||||
-rw-r--r-- | dix/devices.c | 3 | ||||
-rw-r--r-- | hw/xfree86/common/xf86Configure.c | 2 | ||||
-rw-r--r-- | xkb/xkbEvents.c | 2 |
5 files changed, 6 insertions, 7 deletions
diff --git a/Xext/panoramiXprocs.c b/Xext/panoramiXprocs.c index 9eb29bd74..18f3ac715 100644 --- a/Xext/panoramiXprocs.c +++ b/Xext/panoramiXprocs.c @@ -106,7 +106,7 @@ PanoramiXCreateWindow(ClientPtr client) if ((Mask) stuff->mask & CWColormap) { cmap_offset = Ones((Mask) stuff->mask & (CWColormap - 1)); tmp = *((CARD32 *) &stuff[1] + cmap_offset); - if ((tmp != CopyFromParent) && (tmp != None)) { + if (tmp != CopyFromParent) { result = dixLookupResourceByType((void **) &cmap, tmp, XRT_COLORMAP, client, DixReadAccess); @@ -210,7 +210,7 @@ PanoramiXChangeWindowAttributes(ClientPtr client) if ((Mask) stuff->valueMask & CWColormap) { cmap_offset = Ones((Mask) stuff->valueMask & (CWColormap - 1)); tmp = *((CARD32 *) &stuff[1] + cmap_offset); - if ((tmp != CopyFromParent) && (tmp != None)) { + if (tmp != CopyFromParent) { result = dixLookupResourceByType((void **) &cmap, tmp, XRT_COLORMAP, client, DixReadAccess); diff --git a/Xext/saver.c b/Xext/saver.c index 0e20467c9..750b8b965 100644 --- a/Xext/saver.c +++ b/Xext/saver.c @@ -1143,7 +1143,7 @@ ProcScreenSaverSetAttributes(ClientPtr client) if ((Mask) stuff->mask & CWColormap) { cmap_offset = Ones((Mask) stuff->mask & (CWColormap - 1)); tmp = *((CARD32 *) &stuff[1] + cmap_offset); - if ((tmp != CopyFromParent) && (tmp != None)) { + if (tmp != CopyFromParent) { status = dixLookupResourceByType((void **) &cmap, tmp, XRT_COLORMAP, client, DixReadAccess); diff --git a/dix/devices.c b/dix/devices.c index 9b0c7d296..a532dcfaa 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -1682,8 +1682,7 @@ ProcSetModifierMapping(ClientPtr client) stuff->numKeyPerModifier); if (rc == MappingFailed || rc == -1) return BadValue; - if (rc != Success && rc != MappingSuccess && rc != MappingFailed && - rc != MappingBusy) + if (rc != MappingSuccess && rc != MappingFailed && rc != MappingBusy) return rc; rep.success = rc; diff --git a/hw/xfree86/common/xf86Configure.c b/hw/xfree86/common/xf86Configure.c index 1271010fa..59d275ea3 100644 --- a/hw/xfree86/common/xf86Configure.c +++ b/hw/xfree86/common/xf86Configure.c @@ -264,7 +264,7 @@ configureDeviceSection(int screennum) ptr->dev_busid = DevToConfig[screennum].GDev.busID; ptr->dev_driver = DevToConfig[screennum].GDev.driver; ptr->dev_ramdac = DevToConfig[screennum].GDev.ramdac; - for (i = 0; (i < MAXDACSPEEDS) && (i < CONF_MAXDACSPEEDS); i++) + for (i = 0; i < MAXDACSPEEDS; i++) ptr->dev_dacSpeeds[i] = DevToConfig[screennum].GDev.dacSpeeds[i]; ptr->dev_videoram = DevToConfig[screennum].GDev.videoRam; ptr->dev_bios_base = DevToConfig[screennum].GDev.BiosBase; diff --git a/xkb/xkbEvents.c b/xkb/xkbEvents.c index 0dbbd6cbc..0bbd66186 100644 --- a/xkb/xkbEvents.c +++ b/xkb/xkbEvents.c @@ -505,7 +505,7 @@ XkbHandleBell(BOOL force, if ((!interest) || (force)) return; - if ((class == 0) || (class == KbdFeedbackClass)) { + if (class == KbdFeedbackClass) { KeybdCtrl *pKeyCtrl = (KeybdCtrl *) pCtrl; id = pKeyCtrl->id; |