[warnings] suppress warnings

Some warnings can not be solved as they depend on external libraries or
limitations of the C standard.
Suppress these warnings selectively
This commit is contained in:
akallabeth 2024-08-30 15:29:27 +02:00
parent 36fbed25c9
commit 5887f8a558
No known key found for this signature in database
GPG Key ID: A49454A3FC909FD5
5 changed files with 23 additions and 0 deletions

View File

@ -162,7 +162,11 @@ static BOOL tsmf_ffmpeg_init_stream(ITSMFDecoder* decoder, const TS_AM_MEDIA_TYP
UINT32 size = 0; UINT32 size = 0;
const BYTE* s = NULL; const BYTE* s = NULL;
TSMFFFmpegDecoder* mdecoder = (TSMFFFmpegDecoder*)decoder; TSMFFFmpegDecoder* mdecoder = (TSMFFFmpegDecoder*)decoder;
WINPR_PRAGMA_DIAG_PUSH
WINPR_PRAGMA_DIAG_IGNORED_QUALIFIERS
mdecoder->codec = avcodec_find_decoder(mdecoder->codec_id); mdecoder->codec = avcodec_find_decoder(mdecoder->codec_id);
WINPR_PRAGMA_DIAG_POP
if (!mdecoder->codec) if (!mdecoder->codec)
{ {

View File

@ -1306,11 +1306,19 @@ static DWORD WINAPI xf_handle_pipe(void* arg)
winpr_strerror(errno, ebuffer, sizeof(ebuffer)), errno); winpr_strerror(errno, ebuffer, sizeof(ebuffer)), errno);
return 0; return 0;
} }
WINPR_PRAGMA_DIAG_PUSH
WINPR_PRAGMA_DIAG_IGNORED_QUALIFIERS
freerdp_add_signal_cleanup_handler(pipe, cleanup_pipe); freerdp_add_signal_cleanup_handler(pipe, cleanup_pipe);
WINPR_PRAGMA_DIAG_POP
xf_process_pipe(context, pipe); xf_process_pipe(context, pipe);
WINPR_PRAGMA_DIAG_PUSH
WINPR_PRAGMA_DIAG_IGNORED_QUALIFIERS
freerdp_del_signal_cleanup_handler(pipe, cleanup_pipe); freerdp_del_signal_cleanup_handler(pipe, cleanup_pipe);
WINPR_PRAGMA_DIAG_POP
unlink(pipe); unlink(pipe);
return 0; return 0;
} }

View File

@ -718,12 +718,15 @@ const char* freerdp_get_version_string(void)
const char* freerdp_get_build_config(void) const char* freerdp_get_build_config(void)
{ {
WINPR_PRAGMA_DIAG_PUSH
WINPR_PRAGMA_DIAG_IGNORED_OVERLENGTH_STRINGS
static const char build_config[] = static const char build_config[] =
"Build configuration: " FREERDP_BUILD_CONFIG "\n" "Build configuration: " FREERDP_BUILD_CONFIG "\n"
"Build type: " FREERDP_BUILD_TYPE "\n" "Build type: " FREERDP_BUILD_TYPE "\n"
"CFLAGS: " FREERDP_CFLAGS "\n" "CFLAGS: " FREERDP_CFLAGS "\n"
"Compiler: " FREERDP_COMPILER_ID ", " FREERDP_COMPILER_VERSION "\n" "Compiler: " FREERDP_COMPILER_ID ", " FREERDP_COMPILER_VERSION "\n"
"Target architecture: " FREERDP_TARGET_ARCH "\n"; "Target architecture: " FREERDP_TARGET_ARCH "\n";
WINPR_PRAGMA_DIAG_POP
return build_config; return build_config;
} }

View File

@ -2852,9 +2852,14 @@ static void log_build_warn(rdpRdp* rdp, const char* what, const char* msg,
BOOL (*cmp)(wLog* log, const char* tok)) BOOL (*cmp)(wLog* log, const char* tok))
{ {
WINPR_ASSERT(rdp); WINPR_ASSERT(rdp);
WINPR_PRAGMA_DIAG_PUSH
WINPR_PRAGMA_DIAG_IGNORED_OVERLENGTH_STRINGS
size_t len = sizeof(FREERDP_BUILD_CONFIG); size_t len = sizeof(FREERDP_BUILD_CONFIG);
char* list = calloc(len, sizeof(char)); char* list = calloc(len, sizeof(char));
char* config = _strdup(FREERDP_BUILD_CONFIG); char* config = _strdup(FREERDP_BUILD_CONFIG);
WINPR_PRAGMA_DIAG_POP
if (config && list) if (config && list)
{ {
char* tok = strtok(config, " "); char* tok = strtok(config, " ");

View File

@ -235,9 +235,12 @@ BOOL winpr_HMAC_Init(WINPR_HMAC_CTX* ctx, WINPR_MD_TYPE md, const void* key, siz
if (!ctx->xhmac) if (!ctx->xhmac)
return FALSE; return FALSE;
WINPR_PRAGMA_DIAG_PUSH
WINPR_PRAGMA_DIAG_IGNORED_QUALIFIERS
const char* param_name = OSSL_MAC_PARAM_DIGEST; const char* param_name = OSSL_MAC_PARAM_DIGEST;
const OSSL_PARAM param[] = { OSSL_PARAM_construct_utf8_string(param_name, hash, 0), const OSSL_PARAM param[] = { OSSL_PARAM_construct_utf8_string(param_name, hash, 0),
OSSL_PARAM_construct_end() }; OSSL_PARAM_construct_end() };
WINPR_PRAGMA_DIAG_POP
if (EVP_MAC_init(ctx->xhmac, key, keylen, param) == 1) if (EVP_MAC_init(ctx->xhmac, key, keylen, param) == 1)
return TRUE; return TRUE;