[PATCH 01/14] Xext: Get rid of useless checks.

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


As noted in a comment, that can't actually happen.

Those warnings go away accordingly:
|   CC     xvmc.lo
| xvmc.c: In function 'XvMCExtensionInit':
| xvmc.c:671:21: warning: the comparison will always evaluate as 'false' for the address of 'XvMCScreenKeyRec' will never be NULL [-Waddress]
| xvmc.c: In function 'XvMCFindXvImage':
| xvmc.c:749: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 |    5 -----
 1 files changed, 0 insertions(+), 5 deletions(-)

diff --git a/Xext/xvmc.c b/Xext/xvmc.c
index 4d29941..d49966f 100644
--- a/Xext/xvmc.c
+++ b/Xext/xvmc.c
@@ -668,9 +668,6 @@ XvMCExtensionInit(void)
 {
    ExtensionEntry *extEntry;
 
-   if(XvMCScreenKey == NULL) /* nobody supports it */
-	return; 
-
    if(!(XvMCRTContext = CreateNewResourceType(XvMCDestroyContextRes,
 					      "XvMCRTContext")))
 	return;
@@ -746,8 +743,6 @@ XvImagePtr XvMCFindXvImage(XvPortPtr pPort, CARD32 id)
     XvMCAdaptorPtr adaptor = NULL;
     int i;
 
-    if(XvMCScreenKey == NULL) return NULL;
-
     if(!(pScreenPriv = XVMC_GET_PRIVATE(pScreen))) 
         return NULL;
 
-- 
1.7.5.1



More information about the xorg-devel mailing list