From f22018302fe5beaea119f81bf2b5a2d900846286 Mon Sep 17 00:00:00 2001 From: akallabeth Date: Fri, 30 Aug 2024 08:22:17 +0200 Subject: [PATCH] [warnings] revert some mismatching function declarations --- channels/rdpsnd/client/rdpsnd_main.c | 4 ++-- channels/tsmf/client/alsa/tsmf_alsa.c | 1 - channels/urbdrc/client/data_transfer.c | 3 +-- channels/video/client/video_main.c | 8 ++++---- libfreerdp/codec/dsp.c | 3 ++- libfreerdp/core/gateway/rdg.c | 2 +- libfreerdp/core/gateway/tsg.c | 2 +- libfreerdp/primitives/prim_YUV.c | 2 +- 8 files changed, 12 insertions(+), 13 deletions(-) diff --git a/channels/rdpsnd/client/rdpsnd_main.c b/channels/rdpsnd/client/rdpsnd_main.c index 50762df26..a656802eb 100644 --- a/channels/rdpsnd/client/rdpsnd_main.c +++ b/channels/rdpsnd/client/rdpsnd_main.c @@ -1698,8 +1698,8 @@ static UINT rdpsnd_on_close(IWTSVirtualChannelCallback* pChannelCallback) } static UINT rdpsnd_on_new_channel_connection(IWTSListenerCallback* pListenerCallback, - IWTSVirtualChannel* pChannel, const BYTE* Data, - const BOOL* pbAccept, + IWTSVirtualChannel* pChannel, BYTE* Data, + BOOL* pbAccept, IWTSVirtualChannelCallback** ppCallback) { GENERIC_CHANNEL_CALLBACK* callback = NULL; diff --git a/channels/tsmf/client/alsa/tsmf_alsa.c b/channels/tsmf/client/alsa/tsmf_alsa.c index e39102ee0..6d8bf109e 100644 --- a/channels/tsmf/client/alsa/tsmf_alsa.c +++ b/channels/tsmf/client/alsa/tsmf_alsa.c @@ -151,7 +151,6 @@ static BOOL tsmf_alsa_play(ITSMFAudioDevice* audio, const BYTE* src, UINT32 data if (alsa->out_handle) { - const size_t sbytes_per_frame = 1ULL * alsa->source_channels * alsa->bytes_per_sample; const size_t rbytes_per_frame = 1ULL * alsa->actual_channels * alsa->bytes_per_sample; pindex = src; end = pindex + data_size; diff --git a/channels/urbdrc/client/data_transfer.c b/channels/urbdrc/client/data_transfer.c index 008778987..d9ad5e759 100644 --- a/channels/urbdrc/client/data_transfer.c +++ b/channels/urbdrc/client/data_transfer.c @@ -121,12 +121,11 @@ static UINT urbdrc_process_register_request_callback(IUDEVICE* pdev, { UINT32 NumRequestCompletion = 0; UINT32 RequestCompletion = 0; - URBDRC_PLUGIN* urbdrc = NULL; if (!callback || !s || !udevman || !pdev) return ERROR_INVALID_PARAMETER; - urbdrc = (URBDRC_PLUGIN*)callback->plugin; + URBDRC_PLUGIN* urbdrc = (URBDRC_PLUGIN*)callback->plugin; if (!urbdrc) return ERROR_INVALID_PARAMETER; diff --git a/channels/video/client/video_main.c b/channels/video/client/video_main.c index 93c117e7d..ad5283593 100644 --- a/channels/video/client/video_main.c +++ b/channels/video/client/video_main.c @@ -1014,8 +1014,8 @@ static UINT video_data_on_close(IWTSVirtualChannelCallback* pChannelCallback) * @return 0 on success, otherwise a Win32 error code */ static UINT video_control_on_new_channel_connection(IWTSListenerCallback* listenerCallback, - IWTSVirtualChannel* channel, const BYTE* Data, - const BOOL* pbAccept, + IWTSVirtualChannel* channel, BYTE* Data, + BOOL* pbAccept, IWTSVirtualChannelCallback** ppCallback) { GENERIC_CHANNEL_CALLBACK* callback = NULL; @@ -1044,8 +1044,8 @@ static UINT video_control_on_new_channel_connection(IWTSListenerCallback* listen } static UINT video_data_on_new_channel_connection(IWTSListenerCallback* pListenerCallback, - IWTSVirtualChannel* pChannel, const BYTE* Data, - const BOOL* pbAccept, + IWTSVirtualChannel* pChannel, BYTE* Data, + BOOL* pbAccept, IWTSVirtualChannelCallback** ppCallback) { GENERIC_CHANNEL_CALLBACK* callback = NULL; diff --git a/libfreerdp/codec/dsp.c b/libfreerdp/codec/dsp.c index b3aa3d1ee..24fe6294c 100644 --- a/libfreerdp/codec/dsp.c +++ b/libfreerdp/codec/dsp.c @@ -1127,7 +1127,8 @@ FREERDP_DSP_CONTEXT* freerdp_dsp_context_new(BOOL encoder) if (!context) return NULL; - freerdp_dsp_common_context_init(&context->common, encoder); + if (!freerdp_dsp_common_context_init(&context->common, encoder)) + goto fail; #if defined(WITH_GSM) context->gsm = gsm_create(); diff --git a/libfreerdp/core/gateway/rdg.c b/libfreerdp/core/gateway/rdg.c index b0c2f5804..895128eaa 100644 --- a/libfreerdp/core/gateway/rdg.c +++ b/libfreerdp/core/gateway/rdg.c @@ -2070,7 +2070,7 @@ static int rdg_bio_puts(BIO* bio, const char* str) return -2; } -static int rdg_bio_gets(BIO* bio, const char* str, int size) +static int rdg_bio_gets(BIO* bio, char* str, int size) { WINPR_UNUSED(bio); WINPR_UNUSED(str); diff --git a/libfreerdp/core/gateway/tsg.c b/libfreerdp/core/gateway/tsg.c index 5e166cb91..abd219bbf 100644 --- a/libfreerdp/core/gateway/tsg.c +++ b/libfreerdp/core/gateway/tsg.c @@ -2970,7 +2970,7 @@ static int transport_bio_tsg_puts(BIO* bio, const char* str) return 1; } -static int transport_bio_tsg_gets(BIO* bio, const char* str, int size) +static int transport_bio_tsg_gets(BIO* bio, char* str, int size) { WINPR_UNUSED(bio); WINPR_UNUSED(str); diff --git a/libfreerdp/primitives/prim_YUV.c b/libfreerdp/primitives/prim_YUV.c index 416e6f672..0ab03d16e 100644 --- a/libfreerdp/primitives/prim_YUV.c +++ b/libfreerdp/primitives/prim_YUV.c @@ -632,7 +632,7 @@ static INLINE BYTE RGB2V(INT32 R, INT32 G, INT32 B) static pstatus_t general_RGBToYUV444_8u_P3AC4R(const BYTE* WINPR_RESTRICT pSrc, UINT32 SrcFormat, const UINT32 srcStep, BYTE* WINPR_RESTRICT pDst[3], - const UINT32 dstStep[3], + UINT32 dstStep[3], const prim_size_t* WINPR_RESTRICT roi) { const UINT32 bpp = FreeRDPGetBytesPerPixel(SrcFormat);