[PATCH xserver 3/4] hw/xwin: Fix -Wmaybe-uninitialized warnings in engine CloseScreen wrappers
Jon Turney
jon.turney at dronecode.org.uk
Tue Apr 18 10:53:06 UTC 2017
../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>
---
hw/xwin/winshadddnl.c | 2 +-
hw/xwin/winshadgdi.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/xwin/winshadddnl.c b/hw/xwin/winshadddnl.c
index 6ad32eb..825c1e0 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 705cdfb..f8295be 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");
--
2.8.3
More information about the xorg-devel
mailing list