From: Jon TURNEY Date: Wed, 3 Apr 2013 15:16:06 +0000 (+0100) Subject: hw/xwin: Fix unused-but-set-variable warnings in windialog.c X-Git-Tag: xorg-server-1.14.99.2~93^2~9 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=cdb74fe17dcb3b5a9c61951f897deaf07f86775f;p=platform%2Fupstream%2Fxorg-server.git hw/xwin: Fix unused-but-set-variable warnings in windialog.c /jhbuild/checkout/xorg/xserver/hw/xwin/windialogs.c: In function ‘winChangeDepthDlgProc’: /jhbuild/checkout/xorg/xserver/hw/xwin/windialogs.c:432:22: error: variable ‘s_pScreen’ set but not used [-Werror=unused-but-set-variable] /jhbuild/checkout/xorg/xserver/hw/xwin/windialogs.c: In function ‘winAboutDlgProc’: /jhbuild/checkout/xorg/xserver/hw/xwin/windialogs.c:564:22: error: variable ‘s_pScreen’ set but not used [-Werror=unused-but-set-variable] Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison --- diff --git a/hw/xwin/windialogs.c b/hw/xwin/windialogs.c index a02146e..86f332a 100644 --- a/hw/xwin/windialogs.c +++ b/hw/xwin/windialogs.c @@ -431,7 +431,6 @@ winChangeDepthDlgProc(HWND hwndDialog, UINT message, { static winPrivScreenPtr s_pScreenPriv = NULL; static winScreenInfo *s_pScreenInfo = NULL; - static ScreenPtr s_pScreen = NULL; #if CYGDEBUG winDebug("winChangeDepthDlgProc\n"); @@ -447,12 +446,11 @@ winChangeDepthDlgProc(HWND hwndDialog, UINT message, /* Store pointers to private structures for future use */ s_pScreenPriv = (winPrivScreenPtr) lParam; s_pScreenInfo = s_pScreenPriv->pScreenInfo; - s_pScreen = s_pScreenInfo->pScreen; #if CYGDEBUG winDebug("winChangeDepthDlgProc - WM_INITDIALOG - s_pScreenPriv: %08x, " - "s_pScreenInfo: %08x, s_pScreen: %08x\n", - s_pScreenPriv, s_pScreenInfo, s_pScreen); + "s_pScreenInfo: %08x\n", + s_pScreenPriv, s_pScreenInfo); #endif #if CYGDEBUG @@ -562,8 +560,6 @@ static wBOOL CALLBACK winAboutDlgProc(HWND hwndDialog, UINT message, WPARAM wParam, LPARAM lParam) { static winPrivScreenPtr s_pScreenPriv = NULL; - static winScreenInfo *s_pScreenInfo = NULL; - static ScreenPtr s_pScreen = NULL; #if CYGDEBUG winDebug("winAboutDlgProc\n"); @@ -576,10 +572,8 @@ winAboutDlgProc(HWND hwndDialog, UINT message, WPARAM wParam, LPARAM lParam) winDebug("winAboutDlgProc - WM_INITDIALOG\n"); #endif - /* Store pointers to private structures for future use */ + /* Store pointer to private structure for future use */ s_pScreenPriv = (winPrivScreenPtr) lParam; - s_pScreenInfo = s_pScreenPriv->pScreenInfo; - s_pScreen = s_pScreenInfo->pScreen; winInitDialog(hwndDialog);