[PATCH 4/9] Xext: fix clang compiler warning

Peter Hutterer peter.hutterer at who-t.net
Thu Oct 30 16:52:41 PDT 2014


shm.c:1150:24: warning: equality comparison with extraneous parentheses
[-Wparentheses-equality]
    if ((shmdesc->addr == ((char *) -1))) {

Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
 Xext/shm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Xext/shm.c b/Xext/shm.c
index b787918..30f688a 100644
--- a/Xext/shm.c
+++ b/Xext/shm.c
@@ -1147,7 +1147,7 @@ ProcShmAttachFd(ClientPtr client)
                          fd, 0);
 
     close(fd);
-    if ((shmdesc->addr == ((char *) -1))) {
+    if (shmdesc->addr == ((char *) -1)) {
         free(shmdesc);
         return BadAccess;
     }
@@ -1237,7 +1237,7 @@ ProcShmCreateSegment(ClientPtr client)
                          MAP_SHARED,
                          fd, 0);
 
-    if ((shmdesc->addr == ((char *) -1))) {
+    if (shmdesc->addr == ((char *) -1)) {
         close(fd);
         free(shmdesc);
         return BadAccess;
-- 
2.1.0



More information about the xorg-devel mailing list