[warnings] fix some msbuild warnings
This commit is contained in:
parent
b29c141c39
commit
7ebefc505f
@ -177,7 +177,6 @@ static DWORD WINAPI audin_winmm_thread_func(LPVOID arg)
|
|||||||
|
|
||||||
if (!winmm->hWaveIn)
|
if (!winmm->hWaveIn)
|
||||||
{
|
{
|
||||||
MMRESULT rc;
|
|
||||||
rc = waveInOpen(&winmm->hWaveIn, WAVE_MAPPER, winmm->pwfx_cur, (DWORD_PTR)waveInProc,
|
rc = waveInOpen(&winmm->hWaveIn, WAVE_MAPPER, winmm->pwfx_cur, (DWORD_PTR)waveInProc,
|
||||||
(DWORD_PTR)winmm,
|
(DWORD_PTR)winmm,
|
||||||
CALLBACK_FUNCTION | WAVE_MAPPED_DEFAULT_COMMUNICATION_DEVICE);
|
CALLBACK_FUNCTION | WAVE_MAPPED_DEFAULT_COMMUNICATION_DEVICE);
|
||||||
|
@ -370,18 +370,15 @@ static void wf_send_resize(wfContext* wfc)
|
|||||||
|
|
||||||
LRESULT CALLBACK wf_event_proc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam)
|
LRESULT CALLBACK wf_event_proc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
HDC hdc;
|
HDC hdc = { 0 };
|
||||||
LONG_PTR ptr;
|
PAINTSTRUCT ps = { 0 };
|
||||||
wfContext* wfc;
|
BOOL processed = FALSE;
|
||||||
int x, y, w, h;
|
RECT windowRect = { 0 };
|
||||||
PAINTSTRUCT ps;
|
MINMAXINFO* minmax = NULL;
|
||||||
BOOL processed;
|
SCROLLINFO si = { 0 };
|
||||||
RECT windowRect;
|
|
||||||
MINMAXINFO* minmax;
|
|
||||||
SCROLLINFO si;
|
|
||||||
processed = TRUE;
|
processed = TRUE;
|
||||||
ptr = GetWindowLongPtr(hWnd, GWLP_USERDATA);
|
LONG_PTR ptr = GetWindowLongPtr(hWnd, GWLP_USERDATA);
|
||||||
wfc = (wfContext*)ptr;
|
wfContext* wfc = (wfContext*)ptr;
|
||||||
|
|
||||||
if (wfc != NULL)
|
if (wfc != NULL)
|
||||||
{
|
{
|
||||||
@ -408,9 +405,8 @@ LRESULT CALLBACK wf_event_proc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case WM_GETMINMAXINFO:
|
case WM_GETMINMAXINFO:
|
||||||
if (freerdp_settings_get_bool(wfc->common.context.settings, FreeRDP_SmartSizing) ||
|
if (freerdp_settings_get_bool(settings, FreeRDP_SmartSizing) ||
|
||||||
(freerdp_settings_get_bool(wfc->common.context.settings,
|
(freerdp_settings_get_bool(settings, FreeRDP_DynamicResolutionUpdate)))
|
||||||
FreeRDP_DynamicResolutionUpdate)))
|
|
||||||
{
|
{
|
||||||
processed = FALSE;
|
processed = FALSE;
|
||||||
}
|
}
|
||||||
@ -494,16 +490,18 @@ LRESULT CALLBACK wf_event_proc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam
|
|||||||
return (LRESULT)1;
|
return (LRESULT)1;
|
||||||
|
|
||||||
case WM_PAINT:
|
case WM_PAINT:
|
||||||
|
{
|
||||||
hdc = BeginPaint(hWnd, &ps);
|
hdc = BeginPaint(hWnd, &ps);
|
||||||
x = ps.rcPaint.left;
|
const int x = ps.rcPaint.left;
|
||||||
y = ps.rcPaint.top;
|
const int y = ps.rcPaint.top;
|
||||||
w = ps.rcPaint.right - ps.rcPaint.left + 1;
|
const int w = ps.rcPaint.right - ps.rcPaint.left + 1;
|
||||||
h = ps.rcPaint.bottom - ps.rcPaint.top + 1;
|
const int h = ps.rcPaint.bottom - ps.rcPaint.top + 1;
|
||||||
wf_scale_blt(wfc, hdc, x, y, w, h, wfc->primary->hdc,
|
wf_scale_blt(wfc, hdc, x, y, w, h, wfc->primary->hdc,
|
||||||
x - wfc->offset_x + wfc->xCurrentScroll,
|
x - wfc->offset_x + wfc->xCurrentScroll,
|
||||||
y - wfc->offset_y + wfc->yCurrentScroll, SRCCOPY);
|
y - wfc->offset_y + wfc->yCurrentScroll, SRCCOPY);
|
||||||
EndPaint(hWnd, &ps);
|
EndPaint(hWnd, &ps);
|
||||||
break;
|
}
|
||||||
|
break;
|
||||||
#if (_WIN32_WINNT >= 0x0500)
|
#if (_WIN32_WINNT >= 0x0500)
|
||||||
|
|
||||||
case WM_XBUTTONDOWN:
|
case WM_XBUTTONDOWN:
|
||||||
@ -725,7 +723,6 @@ LRESULT CALLBACK wf_event_proc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam
|
|||||||
{
|
{
|
||||||
if (wParam == SYSCOMMAND_ID_SMARTSIZING)
|
if (wParam == SYSCOMMAND_ID_SMARTSIZING)
|
||||||
{
|
{
|
||||||
rdpSettings* settings = wfc->common.context.settings;
|
|
||||||
HMENU hMenu = GetSystemMenu(wfc->hwnd, FALSE);
|
HMENU hMenu = GetSystemMenu(wfc->hwnd, FALSE);
|
||||||
const BOOL rc = freerdp_settings_get_bool(settings, FreeRDP_SmartSizing);
|
const BOOL rc = freerdp_settings_get_bool(settings, FreeRDP_SmartSizing);
|
||||||
freerdp_settings_set_bool(settings, FreeRDP_SmartSizing, !rc);
|
freerdp_settings_set_bool(settings, FreeRDP_SmartSizing, !rc);
|
||||||
@ -837,11 +834,10 @@ LRESULT CALLBACK wf_event_proc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam
|
|||||||
BOOL wf_scale_blt(wfContext* wfc, HDC hdc, int x, int y, int w, int h, HDC hdcSrc, int x1, int y1,
|
BOOL wf_scale_blt(wfContext* wfc, HDC hdc, int x, int y, int w, int h, HDC hdcSrc, int x1, int y1,
|
||||||
DWORD rop)
|
DWORD rop)
|
||||||
{
|
{
|
||||||
rdpSettings* settings;
|
|
||||||
UINT32 ww, wh, dw, dh;
|
UINT32 ww, wh, dw, dh;
|
||||||
WINPR_ASSERT(wfc);
|
WINPR_ASSERT(wfc);
|
||||||
|
|
||||||
settings = wfc->common.context.settings;
|
rdpSettings* settings = wfc->common.context.settings;
|
||||||
WINPR_ASSERT(settings);
|
WINPR_ASSERT(settings);
|
||||||
|
|
||||||
if (!wfc->client_width)
|
if (!wfc->client_width)
|
||||||
|
@ -246,8 +246,8 @@ static long transport_bio_simple_ctrl(BIO* bio, int cmd, long arg1, void* arg2)
|
|||||||
} while ((status < 0) && (errno == EINTR));
|
} while ((status < 0) && (errno == EINTR));
|
||||||
|
|
||||||
#else
|
#else
|
||||||
fd_set rset;
|
fd_set rset = { 0 };
|
||||||
struct timeval tv;
|
struct timeval tv = { 0 };
|
||||||
FD_ZERO(&rset);
|
FD_ZERO(&rset);
|
||||||
FD_SET(sockfd, &rset);
|
FD_SET(sockfd, &rset);
|
||||||
|
|
||||||
@ -285,8 +285,8 @@ static long transport_bio_simple_ctrl(BIO* bio, int cmd, long arg1, void* arg2)
|
|||||||
} while ((status < 0) && (errno == EINTR));
|
} while ((status < 0) && (errno == EINTR));
|
||||||
|
|
||||||
#else
|
#else
|
||||||
fd_set rset;
|
fd_set rset = { 0 };
|
||||||
struct timeval tv;
|
struct timeval tv = { 0 };
|
||||||
FD_ZERO(&rset);
|
FD_ZERO(&rset);
|
||||||
FD_SET(sockfd, &rset);
|
FD_SET(sockfd, &rset);
|
||||||
|
|
||||||
@ -1447,8 +1447,8 @@ static BOOL freerdp_tcp_layer_wait(void* userContext, BOOL waitWrite, DWORD time
|
|||||||
} while ((status < 0) && (errno == EINTR));
|
} while ((status < 0) && (errno == EINTR));
|
||||||
|
|
||||||
#else
|
#else
|
||||||
fd_set rset;
|
fd_set rset = { 0 };
|
||||||
struct timeval tv;
|
struct timeval tv = { 0 };
|
||||||
FD_ZERO(&rset);
|
FD_ZERO(&rset);
|
||||||
FD_SET(sockfd, &rset);
|
FD_SET(sockfd, &rset);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user