From dfa8b37cfb2589f2474f6fcc755dde77bfdd6fed Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Wed, 29 Jul 2015 11:30:15 -0400 Subject: [PATCH] glxproxy: Fix an obvious thinko in QueryExtensionsString MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit gcc 5.1 throws a rather amusing warning here: glxcmdsswap.c: In function ‘__glXSwapQueryExtensionsString’: glxcmdsswap.c:439:1: warning: function might be candidate for attribute ‘noreturn’ [-Wsuggest-attribute=noreturn] __glXSwapQueryExtensionsString(__GLXclientState * cl, GLbyte * pc) This is entirely accurate, albeit curiously phrased: swapping some bits hanging off the end of a null pointer will make Xdmx crash, so from the perspective of code generation the function will indeed not return. Reviewed-by: Keith Packard Signed-off-by: Adam Jackson --- hw/dmx/glxProxy/glxcmdsswap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/dmx/glxProxy/glxcmdsswap.c b/hw/dmx/glxProxy/glxcmdsswap.c index 600a6e1cb..5b1722d57 100644 --- a/hw/dmx/glxProxy/glxcmdsswap.c +++ b/hw/dmx/glxProxy/glxcmdsswap.c @@ -438,7 +438,7 @@ __glXSwapUseXFont(__GLXclientState * cl, GLbyte * pc) int __glXSwapQueryExtensionsString(__GLXclientState * cl, GLbyte * pc) { - xGLXQueryExtensionsStringReq *req = NULL; + xGLXQueryExtensionsStringReq *req = (xGLXQueryExtensionsStringReq *) pc; __GLX_DECLARE_SWAP_VARIABLES;