From c3147a20065b212fac78eb29c9bb9e150f9b22f5 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Thu, 27 Apr 2017 14:45:24 -0400 Subject: [PATCH] dmx: Fix decl mismatch for XRT_WINDOW MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Alan Coopersmith --- 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