From 6c25607c76eb49d5b69e095bd5028d1aa17ad535 Mon Sep 17 00:00:00 2001 From: akallabeth Date: Wed, 25 Sep 2024 03:30:40 +0200 Subject: [PATCH] [client,common] fix integer narrow --- client/common/test/TestClientCmdLine.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/client/common/test/TestClientCmdLine.c b/client/common/test/TestClientCmdLine.c index d7ed102c4..8bc7d7862 100644 --- a/client/common/test/TestClientCmdLine.c +++ b/client/common/test/TestClientCmdLine.c @@ -46,7 +46,10 @@ static INLINE BOOL testcase(const char* name, char** argv, size_t argc, int expe int status = 0; BOOL valid_settings = TRUE; rdpSettings* settings = freerdp_settings_new(0); - print_test_title(argc, argv); + + WINPR_ASSERT(argc <= INT_MAX); + + print_test_title((int)argc, argv); if (!settings) { @@ -54,7 +57,7 @@ static INLINE BOOL testcase(const char* name, char** argv, size_t argc, int expe return FALSE; } - status = freerdp_client_settings_parse_command_line(settings, argc, argv, FALSE); + status = freerdp_client_settings_parse_command_line(settings, (int)argc, argv, FALSE); if (validate_settings) {