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 "winclipboard.h"
#include "misc.h" #include "misc.h"
extern void winFixClipboardChain();
/* /*
* Constants * Constants
*/ */

View File

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

View File

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

View File

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