[PATCH xserver 1/2] dmx: Fix decl mismatch for XRT_WINDOW

Adam Jackson ajax at redhat.com
Thu Apr 27 18:45:24 UTC 2017


Building xserver with meson -Db_lto=true found this! Check it:

../hw/dmx/dmx.c:66:22: warning: type of ‘XRT_WINDOW’ does not match
                                original declaration [-Wlto-type-mismatch]
 extern unsigned long XRT_WINDOW;
                      ^
../include/resource.h:58:18: note: type ‘RESTYPE’ should match type ‘long
                                   unsigned int’
 typedef uint32_t RESTYPE;
                  ^
../Xext/panoramiX.c:85:9: note: ‘XRT_WINDOW’ was previously declared here
 RESTYPE XRT_WINDOW;
         ^
../Xext/panoramiX.c:85:9: note: code may be misoptimized unless
                                -fno-strict-aliasing is used

I have never managed successfully to build xserver with LTO with
autotools, so, score one for meson.

Get the decl from panoramiXsrv.h, which includes panoramiX.h first anyway.

Signed-off-by: Adam Jackson <ajax at redhat.com>
---
 hw/dmx/dmx.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/hw/dmx/dmx.c b/hw/dmx/dmx.c
index 6c3614276..88fe9d3d4 100644
--- a/hw/dmx/dmx.c
+++ b/hw/dmx/dmx.c
@@ -62,8 +62,7 @@
 #include "protocol-versions.h"
 
 #ifdef PANORAMIX
-#include "panoramiX.h"
-extern unsigned long XRT_WINDOW;
+#include "panoramiXsrv.h"
 extern int PanoramiXNumScreens;
 #endif
 
-- 
2.12.2



More information about the xorg-devel mailing list