Cygwin/X: more warnings fixes

More warning fixes, mainly removing casts on function return values

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
This commit is contained in:
Jon TURNEY 2009-02-20 15:21:35 +00:00
parent e79db6a97d
commit b079945c39
4 changed files with 31 additions and 32 deletions

View File

@ -38,9 +38,6 @@
#include "winclipboard.h"
#include "misc.h"
extern void winFixClipboardChain();
/*
* Constants
*/

View File

@ -311,7 +311,7 @@ winDisplayExitDialog (winPrivScreenPtr pScreenPriv)
/* Set focus to the Cancel button */
PostMessage (g_hDlgExit, WM_NEXTDLGCTL,
(int) GetDlgItem (g_hDlgExit, IDCANCEL), TRUE);
GetDlgItem (g_hDlgExit, IDCANCEL), TRUE);
}
#define CONNECTED_CLIENTS_FORMAT "There are currently %d clients connected."
@ -579,7 +579,7 @@ winDisplayAboutDialog (winPrivScreenPtr pScreenPriv)
/* Set focus to the OK button */
PostMessage (g_hDlgAbout, WM_NEXTDLGCTL,
(int) GetDlgItem (g_hDlgAbout, IDOK), TRUE);
GetDlgItem (g_hDlgAbout, IDOK), TRUE);
}
@ -660,7 +660,7 @@ winAboutDlgProc (HWND hwndDialog, UINT message,
case ID_ABOUT_CHANGELOG:
{
int iReturn;
HINSTANCE iReturn;
#ifdef __CYGWIN__
const char * pszCygPath = "/usr/X11R6/share/doc/"
"xorg-x11-xwin/changelog.html";
@ -673,12 +673,12 @@ winAboutDlgProc (HWND hwndDialog, UINT message,
"devel/server/changelog.html";
#endif
iReturn = (int) ShellExecute (NULL,
"open",
pszWinPath,
NULL,
NULL,
SW_MAXIMIZE);
iReturn = ShellExecute (NULL,
"open",
pszWinPath,
NULL,
NULL,
SW_MAXIMIZE);
if (iReturn < 32)
{
ErrorF ("winAboutDlgProc - WM_COMMAND - ID_ABOUT_CHANGELOG - "
@ -693,12 +693,12 @@ winAboutDlgProc (HWND hwndDialog, UINT message,
const char * pszPath = "http://x.cygwin.com/";
int iReturn;
iReturn = (int) ShellExecute (NULL,
"open",
pszPath,
NULL,
NULL,
SW_MAXIMIZE);
iReturn = ShellExecute (NULL,
"open",
pszPath,
NULL,
NULL,
SW_MAXIMIZE);
if (iReturn < 32)
{
ErrorF ("winAboutDlgProc - WM_COMMAND - ID_ABOUT_WEBSITE - "
@ -713,12 +713,12 @@ winAboutDlgProc (HWND hwndDialog, UINT message,
const char * pszPath = "http://x.cygwin.com/docs/ug/";
int iReturn;
iReturn = (int) ShellExecute (NULL,
"open",
pszPath,
NULL,
NULL,
SW_MAXIMIZE);
iReturn = ShellExecute (NULL,
"open",
pszPath,
NULL,
NULL,
SW_MAXIMIZE);
if (iReturn < 32)
{
ErrorF ("winAboutDlgProc - WM_COMMAND - ID_ABOUT_UG - "
@ -733,12 +733,12 @@ winAboutDlgProc (HWND hwndDialog, UINT message,
const char * pszPath = "http://x.cygwin.com/docs/faq/";
int iReturn;
iReturn = (int) ShellExecute (NULL,
"open",
pszPath,
NULL,
NULL,
SW_MAXIMIZE);
iReturn = ShellExecute (NULL,
"open",
pszPath,
NULL,
NULL,
SW_MAXIMIZE);
if (iReturn < 32)
{
ErrorF ("winAboutDlgProc - WM_COMMAND - ID_ABOUT_FAQ - "

View File

@ -37,6 +37,9 @@
#include "winprefs.h"
#include "propertyst.h"
#include "windowstr.h"
/*
* External global variables
*/

View File

@ -42,7 +42,7 @@
*/
extern HWND g_hDlgExit;
extern char *g_pszLogFile;
/*
* FIXME: Headers are broken, DEFINE_GUID doesn't work correctly,
@ -646,7 +646,6 @@ winShadowUpdateDD (ScreenPtr pScreen,
/* Has our memory pointer changed? */
if (pScreenInfo->pfb != pScreenPriv->pddsdShadow->lpSurface)
{
extern char *g_pszLogFile;
ErrorF ("winShadowUpdateDD - Memory location of the shadow "
"surface has changed, trying to update the root window "
"pixmap header to point to the new address. If you get "