xserver: Branch 'master' - 4 commits

Adam Jackson ajax at kemper.freedesktop.org
Mon May 15 21:48:06 UTC 2017


 hw/xfree86/common/xf86Config.c |    2 ++
 hw/xwin/winmultiwindowwm.c     |    2 ++
 hw/xwin/winshadddnl.c          |    2 +-
 hw/xwin/winshadgdi.c           |    2 +-
 hw/xwin/winwndproc.c           |    7 ++++---
 5 files changed, 10 insertions(+), 5 deletions(-)

New commits:
commit fd96ff7fb325f54cb06c2bf5b8c37c75457b5c42
Author: Jon Turney <jon.turney at dronecode.org.uk>
Date:   Tue Apr 18 10:44:55 2017 +0100

    hw/xwin: Fix -Wunused-function warning for MessageName() in non-debug builds
    
    ../hw/xwin/winmultiwindowwm.c:188:1: warning: ‘MessageName’ defined but not used [-Wunused-function]
    
    Signed-off-by: Jon Turney <jon.turney at dronecode.org.uk>
    Reviewed-by: Yaakov Selkowitz <yselkowitz at users.sourceforge.net>

diff --git a/hw/xwin/winmultiwindowwm.c b/hw/xwin/winmultiwindowwm.c
index df7e6d3d5..c68387d81 100644
--- a/hw/xwin/winmultiwindowwm.c
+++ b/hw/xwin/winmultiwindowwm.c
@@ -184,6 +184,7 @@ static Bool g_shutdown = FALSE;
  * Translate msg id to text, for debug purposes
  */
 
+#if CYGMULTIWINDOW_DEBUG
 static const char *
 MessageName(winWMMessagePtr msg)
 {
@@ -233,6 +234,7 @@ MessageName(winWMMessagePtr msg)
       break;
     }
 }
+#endif
 
 
 /*
commit e49f5947eda578d8b029f42fb4ec9c90f413b4b3
Author: Jon Turney <jon.turney at dronecode.org.uk>
Date:   Tue Apr 18 10:45:07 2017 +0100

    hw/xwin: Fix -Wmaybe-uninitialized warnings in engine CloseScreen wrappers
    
    ../hw/xwin/winshadgdi.c: In function ‘winCloseScreenShadowGDI’:
    ../hw/xwin/winshadgdi.c:632:12: warning: ‘fReturn’ may be used uninitialized in this function [-Wmaybe-uninitialized]
    ../hw/xwin/winshadgdi.c:579:10: note: ‘fReturn’ was declared here
    ../hw/xwin/winshadddnl.c: In function ‘winCloseScreenShadowDDNL’:
    ../hw/xwin/winshadddnl.c:711:12: warning: ‘fReturn’ may be used uninitialized in this function [-Wmaybe-uninitialized]
    ../hw/xwin/winshadddnl.c:661:10: note: ‘fReturn’ was declared here
    
    Signed-off-by: Jon Turney <jon.turney at dronecode.org.uk>
    Reviewed-by: Yaakov Selkowitz <yselkowitz at users.sourceforge.net>

diff --git a/hw/xwin/winshadddnl.c b/hw/xwin/winshadddnl.c
index 6ad32eb68..825c1e081 100644
--- a/hw/xwin/winshadddnl.c
+++ b/hw/xwin/winshadddnl.c
@@ -658,7 +658,7 @@ winCloseScreenShadowDDNL(ScreenPtr pScreen)
 {
     winScreenPriv(pScreen);
     winScreenInfo *pScreenInfo = pScreenPriv->pScreenInfo;
-    Bool fReturn;
+    Bool fReturn = TRUE;
 
 #if CYGDEBUG
     winDebug("winCloseScreenShadowDDNL - Freeing screen resources\n");
diff --git a/hw/xwin/winshadgdi.c b/hw/xwin/winshadgdi.c
index 705cdfbd7..f8295be95 100644
--- a/hw/xwin/winshadgdi.c
+++ b/hw/xwin/winshadgdi.c
@@ -576,7 +576,7 @@ winCloseScreenShadowGDI(ScreenPtr pScreen)
 {
     winScreenPriv(pScreen);
     winScreenInfo *pScreenInfo = pScreenPriv->pScreenInfo;
-    Bool fReturn;
+    Bool fReturn = TRUE;
 
 #if CYGDEBUG
     winDebug("winCloseScreenShadowGDI - Freeing screen resources\n");
commit 319daa7a9fa8bcfdefb08d7770912775af22ad99
Author: Jon Turney <jon.turney at dronecode.org.uk>
Date:   Wed Apr 19 13:30:27 2017 +0100

    hw/xwin: Fix -Wmaybe-uninitialized warning in winWindowProc
    
    This is possibly an actual bug in failing to check we successfully retrieved
    the monitor size before using it to set the X screen size.
    
    ../hw/xwin/winwndproc.c: In function ‘winWindowProc’:
    ../hw/xwin/winwndproc.c:283:55: warning: ‘dwHeight’ may be used uninitialized in this function [-Wmaybe-uninitialized]
    ../hw/xwin/winwndproc.c:240:32: note: ‘dwHeight’ was declared here
    ../hw/xwin/winwndproc.c:281:54: warning: ‘dwWidth’ may be used uninitialized in this function [-Wmaybe-uninitialized]
    ../hw/xwin/winwndproc.c:240:23: note: ‘dwWidth’ was declared here
    
    Signed-off-by: Jon Turney <jon.turney at dronecode.org.uk>
    Reviewed-by: Yaakov Selkowitz <yselkowitz at users.sourceforge.net>

diff --git a/hw/xwin/winwndproc.c b/hw/xwin/winwndproc.c
index 7236a9520..ad9f1b337 100644
--- a/hw/xwin/winwndproc.c
+++ b/hw/xwin/winwndproc.c
@@ -237,7 +237,7 @@ winWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
                                                                     fMultiWindow
 #endif
                 )) {
-                DWORD dwWidth, dwHeight;
+                DWORD dwWidth = 0, dwHeight = 0;
 
                 if (s_pScreenInfo->fMultipleMonitors) {
                     /* resize to new virtual desktop size */
@@ -273,8 +273,9 @@ winWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
                  */
 
                 /* Set screen size to match new size, if it is different to current */
-                if ((s_pScreenInfo->dwWidth != dwWidth) ||
-                    (s_pScreenInfo->dwHeight != dwHeight)) {
+                if (((dwWidth != 0) && (dwHeight != 0)) &&
+                    ((s_pScreenInfo->dwWidth != dwWidth) ||
+                     (s_pScreenInfo->dwHeight != dwHeight))) {
                     winDoRandRScreenSetSize(s_pScreen,
                                             dwWidth,
                                             dwHeight,
commit 7a90c9b24e6776c8f1fa43df4268f79a465c0d4e
Author: Jon Turney <jon.turney at dronecode.org.uk>
Date:   Tue Apr 18 10:32:31 2017 +0100

    xfree86: Hide unused variables when !XSERVER_LIBPCIACCESS
    
    ../hw/xfree86/common/xf86Config.c: In function ‘xf86HandleConfigFile’:
    ../hw/xfree86/common/xf86Config.c:2278:10: warning: unused variable ‘singlecard’ [-Wunused-variable]
    ../hw/xfree86/common/xf86Config.c:2277:17: warning: unused variable ‘scanptr’ [-Wunused-variable]
    
    Signed-off-by: Jon Turney <jon.turney at dronecode.org.uk>
    Reviewed-by: Yaakov Selkowitz <yselkowitz at users.sourceforge.net>

diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c
index fa04a3f11..053cac168 100644
--- a/hw/xfree86/common/xf86Config.c
+++ b/hw/xfree86/common/xf86Config.c
@@ -2274,8 +2274,10 @@ checkInput(serverLayoutPtr layout, Bool implicit_layout)
 ConfigStatus
 xf86HandleConfigFile(Bool autoconfig)
 {
+#ifdef XSERVER_LIBPCIACCESS
     const char *scanptr;
     Bool singlecard = 0;
+#endif
     Bool implicit_layout = FALSE;
     XF86ConfLayoutPtr layout;
 


More information about the xorg-commit mailing list