[PATCH 02/14] Xext: Get rid of buggy/useless check.

Cyril Brulebois kibi at debian.org
Tue May 24 09:41:06 PDT 2011


XvMCScreenKey is defined as XvMCScreenKeyRec's address, so will never be
NULL. If a check for XvMC adaptors is needed, that's not the way to
implement it.

This warning goes away accordingly:
|   CC     xvmc.lo
| xvmc.c: In function 'ProcXvMCListSubpictureTypes':
| xvmc.c:490:22: warning: the comparison will always evaluate as 'false' for the address of 'XvMCScreenKeyRec' will never be NULL [-Waddress]

Signed-off-by: Cyril Brulebois <kibi at debian.org>
---
 Xext/xvmc.c |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)

diff --git a/Xext/xvmc.c b/Xext/xvmc.c
index d49966f..daf7f60 100644
--- a/Xext/xvmc.c
+++ b/Xext/xvmc.c
@@ -487,9 +487,6 @@ ProcXvMCListSubpictureTypes(ClientPtr client)
 
     pScreen = pPort->pAdaptor->pScreen;
 
-    if(XvMCScreenKey == NULL) /* No XvMC adaptors */
-        return BadMatch;
-
     if(!(pScreenPriv = XVMC_GET_PRIVATE(pScreen)))
         return BadMatch;   /* None this screen */
 
-- 
1.7.5.1



More information about the xorg-devel mailing list