summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--generic/tkWindow.c6
-rw-r--r--win/tkWinDialog.c19
-rw-r--r--win/tkWinX.c4
-rw-r--r--win/ttkWinXPTheme.c2
4 files changed, 16 insertions, 15 deletions
diff --git a/generic/tkWindow.c b/generic/tkWindow.c
index 306b818..b3527e6 100644
--- a/generic/tkWindow.c
+++ b/generic/tkWindow.c
@@ -2858,7 +2858,7 @@ TkCygwinMainEx(
return 0;
}
tkmainex = (void (*)(int, char **, Tcl_AppInitProc *, Tcl_Interp *))
- GetProcAddress(tkcygwindll, "Tk_MainEx");
+ (void *)GetProcAddress(tkcygwindll, "Tk_MainEx");
if (!tkmainex) {
return 0;
}
@@ -2898,7 +2898,7 @@ Tk_Init(
if (tkcygwindll) {
int (*tkinit)(Tcl_Interp *);
- tkinit = (int(*)(Tcl_Interp *)) GetProcAddress(tkcygwindll,"Tk_Init");
+ tkinit = (int(*)(Tcl_Interp *))(void *)GetProcAddress(tkcygwindll,"Tk_Init");
if (tkinit) {
return tkinit(interp);
}
@@ -2972,7 +2972,7 @@ Tk_SafeInit(
int (*tksafeinit)(Tcl_Interp *);
tksafeinit = (int (*)(Tcl_Interp *))
- GetProcAddress(tkcygwindll, "Tk_SafeInit");
+ (void *)GetProcAddress(tkcygwindll, "Tk_SafeInit");
if (tksafeinit) {
return tksafeinit(interp);
}
diff --git a/win/tkWinDialog.c b/win/tkWinDialog.c
index e81c469..9f53396 100644
--- a/win/tkWinDialog.c
+++ b/win/tkWinDialog.c
@@ -633,16 +633,17 @@ static void LoadShellProcs(void)
{
static HMODULE shell32_handle = NULL;
- if (shell32_handle != NULL)
- return; /* We have already been through here. */
+ if (shell32_handle != NULL) {
+ return; /* We have already been through here. */
+ }
shell32_handle = GetModuleHandleW(L"shell32.dll");
- if (shell32_handle == NULL) /* Should never happen but check anyways. */
- return;
+ if (shell32_handle == NULL) { /* Should never happen but check anyways. */
+ return;
+ }
- ShellProcs.SHCreateItemFromParsingName =
- (SHCreateItemFromParsingNameProc*) GetProcAddress(shell32_handle,
- "SHCreateItemFromParsingName");
+ ShellProcs.SHCreateItemFromParsingName = (SHCreateItemFromParsingNameProc*)
+ (void *)GetProcAddress(shell32_handle, "SHCreateItemFromParsingName");
}
@@ -788,7 +789,7 @@ Tk_ChooseColorObjCmd(
chooseColor.lpCustColors = dwCustColors;
chooseColor.Flags = CC_RGBINIT | CC_FULLOPEN | CC_ENABLEHOOK;
chooseColor.lCustData = (LPARAM) NULL;
- chooseColor.lpfnHook = (LPOFNHOOKPROC) ColorDlgHookProc;
+ chooseColor.lpfnHook = (LPOFNHOOKPROC)(void *)ColorDlgHookProc;
chooseColor.lpTemplateName = (LPWSTR) interp;
for (i = 1; i < objc; i += 2) {
@@ -1602,7 +1603,7 @@ static int GetFileNameXP(Tcl_Interp *interp, OFNOpts *optsPtr, enum OFNOper oper
ofn.nMaxFile = TK_MULTI_MAX_PATH;
ofn.Flags = OFN_HIDEREADONLY | OFN_PATHMUSTEXIST | OFN_NOCHANGEDIR
| OFN_EXPLORER| OFN_ENABLEHOOK| OFN_ENABLESIZING;
- ofn.lpfnHook = (LPOFNHOOKPROC) OFNHookProc;
+ ofn.lpfnHook = (LPOFNHOOKPROC)(void *)OFNHookProc;
ofn.lCustData = (LPARAM) &ofnData;
if (oper != OFN_FILE_SAVE) {
diff --git a/win/tkWinX.c b/win/tkWinX.c
index 8124e50..24ff4d1 100644
--- a/win/tkWinX.c
+++ b/win/tkWinX.c
@@ -129,8 +129,8 @@ TkGetServerInfo(
if (!buffer[0]) {
HMODULE handle = GetModuleHandleW(L"NTDLL");
- int(__stdcall *getversion)(void *) =
- (int(__stdcall *)(void *))GetProcAddress(handle, "RtlGetVersion");
+ int(__stdcall *getversion)(void *) = (int(__stdcall *)(void *))
+ (void *)GetProcAddress(handle, "RtlGetVersion");
os.dwOSVersionInfoSize = sizeof(OSVERSIONINFOW);
if (!getversion || getversion(&os)) {
GetVersionExW(&os);
diff --git a/win/ttkWinXPTheme.c b/win/ttkWinXPTheme.c
index 7f20ed1..11150ff 100644
--- a/win/ttkWinXPTheme.c
+++ b/win/ttkWinXPTheme.c
@@ -104,7 +104,7 @@ LoadXPThemeProcs(HINSTANCE *phlib)
*/
XPThemeProcs *procs = (XPThemeProcs *)ckalloc(sizeof(XPThemeProcs));
#define LOADPROC(name) \
- (0 != (procs->name = (name ## Proc *)GetProcAddress(handle, #name) ))
+ (0 != (procs->name = (name ## Proc *)(void *)GetProcAddress(handle, #name) ))
if ( LOADPROC(OpenThemeData)
&& LOADPROC(CloseThemeData)