aboutsummaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2023-01-04 19:43:16 +0100
committerPierre Ossman <ossman@cendio.se>2023-01-05 16:43:34 +0100
commit36f3690b09c2377814443f47fb493b767826aacf (patch)
treef9baaa7bab96e22172f60f381c8b3b3a6059adc5 /win
parent03ca97526bf838fe3fe65087ae32b01a64093975 (diff)
downloadtigervnc-36f3690b09c2377814443f47fb493b767826aacf.tar.gz
tigervnc-36f3690b09c2377814443f47fb493b767826aacf.zip
Work around -Wcast-function-type
That warning doesn't play well with Windows' GetProcAddress(), so add some extra casting to work around it.
Diffstat (limited to 'win')
-rw-r--r--win/rfb_win32/WMHooks.cxx18
-rw-r--r--win/winvnc/VNCServerService.cxx2
2 files changed, 10 insertions, 10 deletions
diff --git a/win/rfb_win32/WMHooks.cxx b/win/rfb_win32/WMHooks.cxx
index 3c58d801..70844563 100644
--- a/win/rfb_win32/WMHooks.cxx
+++ b/win/rfb_win32/WMHooks.cxx
@@ -72,37 +72,37 @@ static void LoadHooks()
if (hooksLibrary == NULL)
return;
- WM_Hooks_WindowChanged = (WM_Hooks_WMVAL_proto)GetProcAddress(hooksLibrary, "WM_Hooks_WindowChanged");
+ WM_Hooks_WindowChanged = (WM_Hooks_WMVAL_proto)(void*)GetProcAddress(hooksLibrary, "WM_Hooks_WindowChanged");
if (WM_Hooks_WindowChanged == NULL)
goto error;
- WM_Hooks_WindowBorderChanged = (WM_Hooks_WMVAL_proto)GetProcAddress(hooksLibrary, "WM_Hooks_WindowBorderChanged");
+ WM_Hooks_WindowBorderChanged = (WM_Hooks_WMVAL_proto)(void*)GetProcAddress(hooksLibrary, "WM_Hooks_WindowBorderChanged");
if (WM_Hooks_WindowBorderChanged == NULL)
goto error;
- WM_Hooks_WindowClientAreaChanged = (WM_Hooks_WMVAL_proto)GetProcAddress(hooksLibrary, "WM_Hooks_WindowClientAreaChanged");
+ WM_Hooks_WindowClientAreaChanged = (WM_Hooks_WMVAL_proto)(void*)GetProcAddress(hooksLibrary, "WM_Hooks_WindowClientAreaChanged");
if (WM_Hooks_WindowClientAreaChanged == NULL)
goto error;
- WM_Hooks_RectangleChanged = (WM_Hooks_WMVAL_proto)GetProcAddress(hooksLibrary, "WM_Hooks_RectangleChanged");
+ WM_Hooks_RectangleChanged = (WM_Hooks_WMVAL_proto)(void*)GetProcAddress(hooksLibrary, "WM_Hooks_RectangleChanged");
if (WM_Hooks_RectangleChanged == NULL)
goto error;
#ifdef _DEBUG
- WM_Hooks_Diagnostic = (WM_Hooks_WMVAL_proto)GetProcAddress(hooksLibrary, "WM_Hooks_Diagnostic");
+ WM_Hooks_Diagnostic = (WM_Hooks_WMVAL_proto)(void*)GetProcAddress(hooksLibrary, "WM_Hooks_Diagnostic");
if (WM_Hooks_Diagnostic == NULL)
goto error;
#endif
- WM_Hooks_Install = (WM_Hooks_Install_proto)GetProcAddress(hooksLibrary, "WM_Hooks_Install");
+ WM_Hooks_Install = (WM_Hooks_Install_proto)(void*)GetProcAddress(hooksLibrary, "WM_Hooks_Install");
if (WM_Hooks_Install == NULL)
goto error;
- WM_Hooks_Remove = (WM_Hooks_Remove_proto)GetProcAddress(hooksLibrary, "WM_Hooks_Remove");
+ WM_Hooks_Remove = (WM_Hooks_Remove_proto)(void*)GetProcAddress(hooksLibrary, "WM_Hooks_Remove");
if (WM_Hooks_Remove == NULL)
goto error;
#ifdef _DEBUG
- WM_Hooks_SetDiagnosticRange = (WM_Hooks_SetDiagnosticRange_proto)GetProcAddress(hooksLibrary, "WM_Hooks_SetDiagnosticRange");
+ WM_Hooks_SetDiagnosticRange = (WM_Hooks_SetDiagnosticRange_proto)(void*)GetProcAddress(hooksLibrary, "WM_Hooks_SetDiagnosticRange");
if (WM_Hooks_SetDiagnosticRange == NULL)
goto error;
#endif
- WM_Hooks_EnableRealInputs = (WM_Hooks_EnableRealInputs_proto)GetProcAddress(hooksLibrary, "WM_Hooks_EnableRealInputs");
+ WM_Hooks_EnableRealInputs = (WM_Hooks_EnableRealInputs_proto)(void*)GetProcAddress(hooksLibrary, "WM_Hooks_EnableRealInputs");
if (WM_Hooks_EnableRealInputs == NULL)
goto error;
diff --git a/win/winvnc/VNCServerService.cxx b/win/winvnc/VNCServerService.cxx
index 43459855..b4f81e27 100644
--- a/win/winvnc/VNCServerService.cxx
+++ b/win/winvnc/VNCServerService.cxx
@@ -49,7 +49,7 @@ VNCServerService::VNCServerService()
if (sasLibrary == NULL) {
sasLibrary = LoadLibrary("sas.dll");
if (sasLibrary != NULL)
- _SendSAS = (SendSAS_proto)GetProcAddress(sasLibrary, "SendSAS");
+ _SendSAS = (SendSAS_proto)(void*)GetProcAddress(sasLibrary, "SendSAS");
}
// - Set the service-mode logging defaults
// These will be overridden by the Log option in the