Fixed findings

List of Findings

Error: COMPILER_WARNING: [#def1]
freerdp-3.8.0-build/FreeRDP-3.8.0/channels/client/addin.c: scope_hint: In function ‘freerdp_channels_find_static_entry_in_table’
freerdp-3.8.0-build/FreeRDP-3.8.0/channels/client/addin.c:57:32: warning[-Wpedantic]: ISO C forbids conversion of function pointer to object pointer type
#   57 |                         return (void*)pEntry->entry;
#      |                                ^
#   55|   		if (strcmp(pEntry->name, identifier) == 0)
#   56|   		{
#   57|-> 			return (void*)pEntry->entry;
#   58|   		}
#   59|   

Error: COMPILER_WARNING (CWE-1164): [#def2]
freerdp-3.8.0-build/FreeRDP-3.8.0/channels/rdpei/client/rdpei_main.c: scope_hint: At top level
freerdp-3.8.0-build/FreeRDP-3.8.0/channels/rdpei/client/rdpei_main.c:526:13: warning[-Wunused-function]: ‘rdpei_print_contact_flags’ defined but not used
#  526 | static void rdpei_print_contact_flags(UINT32 contactFlags)
#      |             ^~~~~~~~~~~~~~~~~~~~~~~~~
#  524|   }
#  525|   
#  526|-> static void rdpei_print_contact_flags(UINT32 contactFlags)
#  527|   {
#  528|   	if (contactFlags & RDPINPUT_CONTACT_FLAG_DOWN)

Error: COMPILER_WARNING (CWE-563): [#def3]
freerdp-3.8.0-build/FreeRDP-3.8.0/channels/rdpei/client/rdpei_main.c: scope_hint: In function ‘rdpei_recv_pdu’
freerdp-3.8.0-build/FreeRDP-3.8.0/channels/rdpei/client/rdpei_main.c:797:16: warning[-Wunused-but-set-variable]: variable ‘pduLength’ set but not used
#  797 |         UINT32 pduLength = 0;
#      |                ^~~~~~~~~
#  795|   {
#  796|   	UINT16 eventId = 0;
#  797|-> 	UINT32 pduLength = 0;
#  798|   	UINT error = 0;
#  799|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def4]
freerdp-3.8.0-build/FreeRDP-3.8.0/channels/rdpsnd/client/rdpsnd_main.c: scope_hint: In function ‘rdpsnd_recv_server_audio_formats_pdu’
freerdp-3.8.0-build/FreeRDP-3.8.0/channels/rdpsnd/client/rdpsnd_main.c:290:20: warning[-Wanalyzer-malloc-leak]: leak of ‘audio_formats_new((long unsigned int)stream_read_u16_le(s, 1))’
freerdp-3.8.0-build/FreeRDP-3.8.0/channels/rdpsnd/client/rdpsnd_main.c:40: included_from: Included from here.
freerdp-3.8.0-build/FreeRDP-3.8.0/channels/rdpsnd/client/rdpsnd_main.c:38: included_from: Included from here.
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:689:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:690:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:690:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:691:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:692:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:127:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:128:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:127:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:128:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:103:9: note: in expansion of macro ‘Stream_CheckAndLogRequiredLengthOfSize’
freerdp-3.8.0-build/FreeRDP-3.8.0/channels/rdpsnd/client/rdpsnd_main.c:784:14: note: in expansion of macro ‘Stream_CheckAndLogRequiredLength’
freerdp-3.8.0-build/FreeRDP-3.8.0/channels/rdpsnd/client/rdpsnd_main.c:790:9: note: in expansion of macro ‘Stream_Read_UINT8’
freerdp-3.8.0-build/FreeRDP-3.8.0/channels/rdpsnd/client/rdpsnd_main.c:790:9: note: in expansion of macro ‘Stream_Read_UINT8’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:147:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:148:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:62:39: note: in definition of macro ‘WINPR_STREAM_CAST’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:127:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:128:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/channels/rdpsnd/client/rdpsnd_main.c:790:9: note: in expansion of macro ‘Stream_Read_UINT8’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h: scope_hint: In function ‘rdpsnd_recv_server_audio_formats_pdu’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:127:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:128:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/channels/rdpsnd/client/rdpsnd_main.c: scope_hint: In function ‘rdpsnd_recv_server_audio_formats_pdu’
freerdp-3.8.0-build/FreeRDP-3.8.0/channels/rdpsnd/client/rdpsnd_main.c:792:9: note: in expansion of macro ‘Stream_Read_UINT16’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:169:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:170:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:62:39: note: in definition of macro ‘WINPR_STREAM_CAST’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:127:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:128:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/channels/rdpsnd/client/rdpsnd_main.c:792:9: note: in expansion of macro ‘Stream_Read_UINT16’
freerdp-3.8.0-build/FreeRDP-3.8.0/channels/rdpsnd/client/rdpsnd_main.c:264:9: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h: scope_hint: In function ‘rdpsnd_recv_server_audio_formats_pdu’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:127:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:128:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/channels/rdpsnd/client/rdpsnd_main.c: scope_hint: In function ‘rdpsnd_recv_server_audio_formats_pdu’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h: scope_hint: In function ‘rdpsnd_recv_server_audio_formats_pdu’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:127:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:128:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/channels/rdpsnd/client/rdpsnd_main.c: scope_hint: In function ‘rdpsnd_recv_server_audio_formats_pdu’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h: scope_hint: In function ‘rdpsnd_recv_server_audio_formats_pdu’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:127:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:128:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/channels/rdpsnd/client/rdpsnd_main.c: scope_hint: In function ‘rdpsnd_recv_server_audio_formats_pdu’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h: scope_hint: In function ‘rdpsnd_recv_server_audio_formats_pdu’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:127:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:128:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/channels/rdpsnd/client/rdpsnd_main.c: scope_hint: In function ‘rdpsnd_recv_server_audio_formats_pdu’
freerdp-3.8.0-build/FreeRDP-3.8.0/channels/rdpsnd/client/rdpsnd_main.c:277:9: note: in expansion of macro ‘Stream_Read_UINT16’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:169:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:170:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:62:39: note: in definition of macro ‘WINPR_STREAM_CAST’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:127:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:128:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/channels/rdpsnd/client/rdpsnd_main.c:277:9: note: in expansion of macro ‘Stream_Read_UINT16’
freerdp-3.8.0-build/FreeRDP-3.8.0/channels/rdpsnd/client/rdpsnd_main.c:278:9: note: in expansion of macro ‘Stream_Read_UINT8’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:147:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:148:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:62:39: note: in definition of macro ‘WINPR_STREAM_CAST’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:127:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:128:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/channels/rdpsnd/client/rdpsnd_main.c:278:9: note: in expansion of macro ‘Stream_Read_UINT8’
freerdp-3.8.0-build/FreeRDP-3.8.0/channels/rdpsnd/client/rdpsnd_main.c:279:9: note: in expansion of macro ‘Stream_Read_UINT16’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:169:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:170:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:62:39: note: in definition of macro ‘WINPR_STREAM_CAST’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:127:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:128:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/channels/rdpsnd/client/rdpsnd_main.c:279:9: note: in expansion of macro ‘Stream_Read_UINT16’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h: scope_hint: In function ‘rdpsnd_recv_server_audio_formats_pdu’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:127:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:128:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/channels/rdpsnd/client/rdpsnd_main.c: scope_hint: In function ‘rdpsnd_recv_server_audio_formats_pdu’
#  288|   		rdpsnd->ServerFormats = audio_formats_new(wNumberOfFormats);
#  289|   
#  290|-> 		if (!rdpsnd->ServerFormats)
#  291|   			return CHANNEL_RC_NO_MEMORY;
#  292|   

Error: COMPILER_WARNING (CWE-563): [#def5]
freerdp-3.8.0-build/FreeRDP-3.8.0/client/SDL/SDL2/dialogs/sdl_connection_dialog.cpp: scope_hint: In member function ‘bool SDLConnectionDialog::showError(const char*, ...)’
freerdp-3.8.0-build/FreeRDP-3.8.0/client/SDL/SDL2/dialogs/sdl_connection_dialog.cpp:92:14: warning[-Wunused-variable]: unused variable ‘rc’
#   92 |         auto rc = show(MSG_ERROR, fmt, ap);
#      |              ^~
#   90|   	va_list ap;
#   91|   	va_start(ap, fmt);
#   92|-> 	auto rc = show(MSG_ERROR, fmt, ap);
#   93|   	va_end(ap);
#   94|   	return setTimer();

Error: COMPILER_WARNING (CWE-195): [#def6]
freerdp-3.8.0-build/FreeRDP-3.8.0/client/SDL/SDL2/dialogs/sdl_connection_dialog.cpp: scope_hint: In static member function ‘static std::string SDLConnectionDialog::print(const char*, __va_list_tag*)’
freerdp-3.8.0-build/FreeRDP-3.8.0/client/SDL/SDL2/dialogs/sdl_connection_dialog.cpp:461:38: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘int’ and ‘std::__cxx11::basic_string<char>::size_type’ {aka ‘long unsigned int’}
#  461 |         } while ((size > 0) && (size > res.size()));
#      |                                 ~~~~~^~~~~~~~~~~~
#  459|   		va_end(copy);
#  460|   
#  461|-> 	} while ((size > 0) && (size > res.size()));
#  462|   
#  463|   	return res;

Error: COMPILER_WARNING (CWE-563): [#def7]
freerdp-3.8.0-build/FreeRDP-3.8.0/client/SDL/SDL2/sdl_freerdp.cpp: scope_hint: In function ‘void sdl_post_final_disconnect(freerdp*)’
freerdp-3.8.0-build/FreeRDP-3.8.0/client/SDL/SDL2/sdl_freerdp.cpp:1158:14: warning[-Wunused-variable]: unused variable ‘context’
# 1158 |         auto context = get_context(instance->context);
#      |              ^~~~~~~
# 1156|   		return;
# 1157|   
# 1158|-> 	auto context = get_context(instance->context);
# 1159|   }
# 1160|   

Error: COMPILER_WARNING (CWE-195): [#def8]
freerdp-3.8.0-build/FreeRDP-3.8.0/client/SDL/SDL2/sdl_monitor.cpp: scope_hint: In function ‘BOOL sdl_detect_monitors(SdlContext*, UINT32*, UINT32*)’
freerdp-3.8.0-build/FreeRDP-3.8.0/client/SDL/SDL2/sdl_monitor.cpp:333:38: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘size_t’ {aka ‘long unsigned int’} and ‘const int’
#  333 |                 for (size_t x = 0; x < numDisplays; x++)
#      |                                    ~~^~~~~~~~~~~~~
#  331|   		if (!freerdp_settings_set_pointer_len(settings, FreeRDP_MonitorIds, nullptr, numDisplays))
#  332|   			return FALSE;
#  333|-> 		for (size_t x = 0; x < numDisplays; x++)
#  334|   		{
#  335|   			if (!freerdp_settings_set_pointer_array(settings, FreeRDP_MonitorIds, x, &x))

Error: COMPILER_WARNING (CWE-195): [#def9]
freerdp-3.8.0-build/FreeRDP-3.8.0/client/SDL/SDL2/sdl_monitor.cpp:343:24: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘unsigned int’ and ‘const int’
#  343 |                 if (nr > numDisplays)
#      |                     ~~~^~~~~~~~~~~~~
#  341|   
#  342|   		/* There were more IDs supplied than there are monitors */
#  343|-> 		if (nr > numDisplays)
#  344|   		{
#  345|   			WLog_ERR(TAG,

Error: COMPILER_WARNING (CWE-195): [#def10]
freerdp-3.8.0-build/FreeRDP-3.8.0/client/SDL/common/sdl_prefs.cpp: scope_hint: In member function ‘std::vector<std::__cxx11::basic_string<char> > SdlPref::get_array(const std::string&, const std::vector<std::__cxx11::basic_string<char> >&)’
freerdp-3.8.0-build/FreeRDP-3.8.0/client/SDL/common/sdl_prefs.cpp:97:27: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’}
#   97 |         for (int x = 0; x < WINPR_JSON_GetArraySize(item); x++)
#      |                         ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   95|   
#   96|   	std::vector<std::string> values;
#   97|-> 	for (int x = 0; x < WINPR_JSON_GetArraySize(item); x++)
#   98|   	{
#   99|   		auto cur = WINPR_JSON_GetArrayItem(item, x);

Error: COMPILER_WARNING (CWE-704): [#def11]
freerdp-3.8.0-build/FreeRDP-3.8.0/client/X11/xf_client.c: scope_hint: In function ‘xf_handle_pipe’
freerdp-3.8.0-build/FreeRDP-3.8.0/client/X11/xf_client.c:1309:44: warning[-Wdiscarded-qualifiers]: passing argument 1 of ‘freerdp_add_signal_cleanup_handler’ discards ‘const’ qualifier from pointer target type
freerdp-3.8.0-build/FreeRDP-3.8.0/client/X11/xf_client.c:77: included_from: Included from here.
freerdp-3.8.0-build/FreeRDP-3.8.0/include/freerdp/utils/signal.h:44:67: note: expected ‘void *’ but argument is of type ‘const char *’
# 1307|   		return 0;
# 1308|   	}
# 1309|-> 	freerdp_add_signal_cleanup_handler(pipe, cleanup_pipe);
# 1310|   
# 1311|   	xf_process_pipe(context, pipe);

Error: COMPILER_WARNING (CWE-704): [#def12]
freerdp-3.8.0-build/FreeRDP-3.8.0/client/X11/xf_client.c:1313:44: warning[-Wdiscarded-qualifiers]: passing argument 1 of ‘freerdp_del_signal_cleanup_handler’ discards ‘const’ qualifier from pointer target type
freerdp-3.8.0-build/FreeRDP-3.8.0/include/freerdp/utils/signal.h:56:67: note: expected ‘void *’ but argument is of type ‘const char *’
# 1311|   	xf_process_pipe(context, pipe);
# 1312|   
# 1313|-> 	freerdp_del_signal_cleanup_handler(pipe, cleanup_pipe);
# 1314|   	unlink(pipe);
# 1315|   	return 0;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def13]
freerdp-3.8.0-build/FreeRDP-3.8.0/client/X11/xf_client.c:1952:13: warning[-Wanalyzer-malloc-leak]: leak of ‘CreateFileDescriptorEventA(0, 0, 0, *xfc.xfds, 1)’
freerdp-3.8.0-build/FreeRDP-3.8.0/client/X11/xf_client.c:1109:9: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/client/X11/xf_client.c:1113:9: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/client/X11/xf_client.c:1116:9: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/client/X11/xf_client.c:1834:9: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/wlog.h:204:29: note: in expansion of macro ‘WLog_Print_tag’
freerdp-3.8.0-build/FreeRDP-3.8.0/client/X11/xf_client.c:1861:17: note: in expansion of macro ‘WLog_INFO’
freerdp-3.8.0-build/FreeRDP-3.8.0/client/X11/xf_client.c:1949:25: note: in expansion of macro ‘CreateFileDescriptorEvent’
# 1950|   
# 1951|   	xfc->NET_WM_ALLOWED_ACTIONS =
# 1952|-> 	    Logging_XInternAtom(xfc->log, xfc->display, "_NET_WM_ALLOWED_ACTIONS", False);
# 1953|   
# 1954|   	xfc->NET_WM_ACTION_CLOSE =

Error: GCC_ANALYZER_WARNING (CWE-401): [#def14]
freerdp-3.8.0-build/FreeRDP-3.8.0/client/X11/xf_client.c:1981:12: warning[-Wanalyzer-malloc-leak]: leak of ‘calloc(16, 20)’
freerdp-3.8.0-build/FreeRDP-3.8.0/client/X11/xf_client.c:1109:9: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/client/X11/xf_client.c:1113:9: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/client/X11/xf_client.c:1116:9: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/client/X11/xf_client.c:1834:9: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/wlog.h:204:29: note: in expansion of macro ‘WLog_Print_tag’
freerdp-3.8.0-build/FreeRDP-3.8.0/client/X11/xf_client.c:1861:17: note: in expansion of macro ‘WLog_INFO’
# 1979|   	xfc->vscreen.monitors = calloc(16, sizeof(MONITOR_INFO));
# 1980|   
# 1981|-> 	if (!xfc->vscreen.monitors)
# 1982|   		goto fail;
# 1983|   	return TRUE;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def15]
freerdp-3.8.0-build/FreeRDP-3.8.0/client/X11/xf_cliprdr.c: scope_hint: In function ‘xf_cliprdr_server_format_data_response’
freerdp-3.8.0-build/FreeRDP-3.8.0/client/X11/xf_cliprdr.c:2293:69: warning[-Wanalyzer-malloc-leak]: leak of ‘xf_cached_data_new(pDstData,  DstSize)’
freerdp-3.8.0-build/FreeRDP-3.8.0/client/X11/xf_cliprdr.c:2140:9: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/client/X11/xf_cliprdr.c:2141:9: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/client/X11/xf_cliprdr.c:2141:9: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/client/X11/xf_cliprdr.c:2144:9: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/client/X11/xf_cliprdr.c:2147:9: note: in expansion of macro ‘WINPR_ASSERT’
# 2291|   			return CHANNEL_RC_OK;
# 2292|   		}
# 2293|-> 		if (!HashTable_Insert(clipboard->cachedData, (void*)(UINT_PTR)dstFormatId, cached_data))
# 2294|   		{
# 2295|   			WLog_WARN(TAG, "Failed to cache clipboard data");

Error: COMPILER_WARNING: [#def16]
freerdp-3.8.0-build/FreeRDP-3.8.0/client/common/cmdline.c:5721:13: warning[-Wpedantic]: ISO C forbids conversion of object pointer to function pointer type
# 5721 |             (PVIRTUALCHANNELENTRYEX)(void*)freerdp_load_channel_addin_entry(
#      |             ^
# 5719|   	PVIRTUALCHANNELENTRY entry = NULL;
# 5720|   	PVIRTUALCHANNELENTRYEX entryEx =
# 5721|-> 	    (PVIRTUALCHANNELENTRYEX)(void*)freerdp_load_channel_addin_entry(
# 5722|   	        name, NULL, NULL, FREERDP_ADDIN_CHANNEL_STATIC | FREERDP_ADDIN_CHANNEL_ENTRYEX);
# 5723|   

Error: COMPILER_WARNING: [#def17]
freerdp-3.8.0-build/FreeRDP-3.8.0/client/common/cmdline.c: scope_hint: In function ‘freerdp_client_load_static_channel_addin’
freerdp-3.8.0-build/FreeRDP-3.8.0/client/common/cmdline.c:5721:37: warning[-Wpedantic]: ISO C forbids conversion of function pointer to object pointer type
# 5721 |             (PVIRTUALCHANNELENTRYEX)(void*)freerdp_load_channel_addin_entry(
#      |                                     ^
# 5719|   	PVIRTUALCHANNELENTRY entry = NULL;
# 5720|   	PVIRTUALCHANNELENTRYEX entryEx =
# 5721|-> 	    (PVIRTUALCHANNELENTRYEX)(void*)freerdp_load_channel_addin_entry(
# 5722|   	        name, NULL, NULL, FREERDP_ADDIN_CHANNEL_STATIC | FREERDP_ADDIN_CHANNEL_ENTRYEX);
# 5723|   

Error: COMPILER_WARNING (CWE-704): [#def18]
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/codec/dsp.c: scope_hint: In function ‘freerdp_dsp_encode’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/codec/dsp.c:1265:83: warning[-Wdiscarded-qualifiers]: passing argument 5 of ‘freerdp_dsp_resample’ discards ‘restrict’ qualifier from pointer target type
# 1265 |         if (!freerdp_dsp_resample(context, resampleData, resampleLength, &format, &data, &length))
#      |                                                                                   ^~~~~
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/codec/dsp.c:236:62: note: expected ‘const BYTE ** restrict’ {aka ‘const unsigned char ** restrict’} but argument is of type ‘const BYTE * restrict*’ {aka ‘const unsigned char * restrict*’}
#  236 |                                  const BYTE** WINPR_RESTRICT data, size_t* WINPR_RESTRICT length)
#      |                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
# 1263|   	format.nChannels = context->common.format.nChannels;
# 1264|   
# 1265|-> 	if (!freerdp_dsp_resample(context, resampleData, resampleLength, &format, &data, &length))
# 1266|   		return FALSE;
# 1267|   

Error: COMPILER_WARNING (CWE-704): [#def19]
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/codec/dsp_fdk_impl.c: scope_hint: In function ‘fdk_aac_dsp_impl_decode_fill’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/codec/dsp_fdk_impl.c:506:30: warning[-Wdiscarded-qualifiers]: initialization discards ‘const’ qualifier from pointer target type
#  504|   	AAC_DECODER_ERROR err;
#  505|   	HANDLE_AACDECODER self = (HANDLE_AACDECODER)handle;
#  506|-> 	UCHAR* pBuffer[] = { data };
#  507|   	const UINT bufferSize[] = { size };
#  508|   

Error: COMPILER_WARNING (CWE-704): [#def20]
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/codec/dsp_fdk_impl.c: scope_hint: In function ‘fdk_aac_dsp_impl_encode’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/codec/dsp_fdk_impl.c:560:31: warning[-Wdiscarded-qualifiers]: initialization discards ‘const’ qualifier from pointer target type
#  558|   	INT inElSizes[] = { sizeof(INT_PCM) };
#  559|   	INT inIdentifiers[] = { IN_AUDIO_DATA };
#  560|-> 	void* inBuffers[] = { data };
#  561|   
#  562|   	const AACENC_BufDesc inBufDesc = {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def21]
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/codec/nsc.c: scope_hint: In function ‘nsc_context_initialize’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/codec/nsc.c:294:44: warning[-Wanalyzer-malloc-leak]: leak of ‘winpr_aligned_recalloc(**context_53(D).priv.PlaneBuffers[i], plength, 1, 32)’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/collections.h:30: included_from: Included from here.
freerdp-3.8.0-build/FreeRDP-3.8.0/include/freerdp/types.h:139: included_from: Included from here.
freerdp-3.8.0-build/FreeRDP-3.8.0/include/freerdp/codec/nsc.h:27: included_from: Included from here.
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/codec/nsc.c:31: included_from: Included from here.
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/codec/nsc.c:242:9: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/codec/nsc.c:243:9: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/collections.h:34: included_from: Included from here.
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:116:9: note: in expansion of macro ‘Stream_CheckAndLogRequiredLengthOfSizeWLog’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/codec/nsc.c:244:14: note: in expansion of macro ‘Stream_CheckAndLogRequiredLengthWLog’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/codec/nsc.c:250:17: note: in expansion of macro ‘Stream_Read_UINT32’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/codec/nsc.c:250:17: note: in expansion of macro ‘Stream_Read_UINT32’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:217:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:218:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:62:39: note: in definition of macro ‘WINPR_STREAM_CAST’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:127:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:128:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/codec/nsc.c:250:17: note: in expansion of macro ‘Stream_Read_UINT32’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/codec/nsc.c:250:17: note: in expansion of macro ‘Stream_Read_UINT32’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/codec/nsc.c:250:17: note: in expansion of macro ‘Stream_Read_UINT32’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:217:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:218:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:62:39: note: in definition of macro ‘WINPR_STREAM_CAST’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:127:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:128:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/codec/nsc.c:250:17: note: in expansion of macro ‘Stream_Read_UINT32’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/codec/nsc.c:254:9: note: in expansion of macro ‘Stream_Read_UINT8’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:147:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:148:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:62:39: note: in definition of macro ‘WINPR_STREAM_CAST’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:127:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:128:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/codec/nsc.c:254:9: note: in expansion of macro ‘Stream_Read_UINT8’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/codec/nsc.c:262:9: note: in expansion of macro ‘Stream_Read_UINT8’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:147:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:148:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:62:39: note: in definition of macro ‘WINPR_STREAM_CAST’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:127:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:128:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/codec/nsc.c:262:9: note: in expansion of macro ‘Stream_Read_UINT8’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:127:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:128:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:716:17: note: in expansion of macro ‘WINPR_ASSERT’
#  292|   	if (plength > context->priv->PlaneBuffersLength)
#  293|   	{
#  294|-> 		for (size_t i = 0; i < 4; i++)
#  295|   		{
#  296|   			void* tmp = (BYTE*)winpr_aligned_recalloc(context->priv->PlaneBuffers[i], plength,

Error: COMPILER_WARNING: [#def22]
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/common/addin.c: scope_hint: In function ‘freerdp_load_dynamic_addin’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/common/addin.c:240:17: warning[-Wpedantic]: ISO C forbids conversion of object pointer to function pointer type
#  240 |         entry = (PVIRTUALCHANNELENTRY)GetProcAddress(library, pszEntryName);
#      |                 ^
#  238|   		goto fail;
#  239|   
#  240|-> 	entry = (PVIRTUALCHANNELENTRY)GetProcAddress(library, pszEntryName);
#  241|   fail:
#  242|   	free(pszRelativeFilePath);

Error: COMPILER_WARNING (CWE-704): [#def23]
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/common/assistance.c: scope_hint: In function ‘freerdp_assistance_populate_settings_from_assistance_file’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/common/assistance.c:1345:29: warning[-Wpointer-to-int-cast]: cast from pointer to integer of different size
# 1343|   		return FALSE;
# 1344|   
# 1345|-> 	const UINT32 port = (UINT32)ArrayList_GetItem(file->MachinePorts, 0);
# 1346|   	if (!freerdp_settings_set_uint32(settings, FreeRDP_ServerPort, port))
# 1347|   		return FALSE;

Error: COMPILER_WARNING (CWE-704): [#def24]
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/common/assistance.c:1354:38: warning[-Wpointer-to-int-cast]: cast from pointer to integer of different size
# 1352|   	for (size_t x = 0; x < ports; x++)
# 1353|   	{
# 1354|-> 		const UINT32 mport = (UINT32)ArrayList_GetItem(file->MachinePorts, x);
# 1355|   		if (!freerdp_settings_set_pointer_array(settings, FreeRDP_TargetNetPorts, x, &mport))
# 1356|   			return FALSE;

Error: COMPILER_WARNING (CWE-704): [#def25]
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/common/assistance.c: scope_hint: In function ‘freerdp_assistance_print_file’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/common/assistance.c:1454:32: warning[-Wpointer-to-int-cast]: cast from pointer to integer of different size
# 1452|   		const char* addr = ArrayList_GetItem(file->MachineAddresses, x);
# 1453|   		if (x < ArrayList_Count(file->MachinePorts))
# 1454|-> 			port = (UINT32)ArrayList_GetItem(file->MachinePorts, x);
# 1455|   		if (x < ArrayList_Count(file->MachineUris))
# 1456|   			uri = ArrayList_GetItem(file->MachineUris, x);

Error: COMPILER_WARNING: [#def26]
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/childsession.c: scope_hint: In function ‘createChildSessionTransport’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/childsession.c:472:13: warning[-Wpedantic]: ISO C forbids conversion of object pointer to function pointer type
#  472 |             (WinStationCreateChildSessionTransportFn)GetProcAddress(
#      |             ^
#  470|   
#  471|   	WinStationCreateChildSessionTransportFn createChildSessionFn =
#  472|-> 	    (WinStationCreateChildSessionTransportFn)GetProcAddress(
#  473|   	        hModule, "WinStationCreateChildSessionTransport");
#  474|   	if (!createChildSessionFn)

Error: COMPILER_WARNING: [#def27]
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/credssp_auth.c: scope_hint: In function ‘auth_resolve_sspi_table’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/credssp_auth.c:818:45: warning[-Wpedantic]: ISO C forbids conversion of object pointer to function pointer type
#  818 |                 InitSecurityInterface_ptr = (INIT_SECURITY_INTERFACE)GetProcAddress(hSSPI, proc_name);
#      |                                             ^
#  816|   		WLog_INFO(TAG, "Using SSPI Module: %s", module_name);
#  817|   
#  818|-> 		InitSecurityInterface_ptr = (INIT_SECURITY_INTERFACE)GetProcAddress(hSSPI, proc_name);
#  819|   
#  820|   		free(sspi_module);

Error: COMPILER_WARNING: [#def28]
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/freerdp.c: scope_hint: In function ‘freerdp_get_build_config’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/freerdp.c:726:13: warning[-Woverlength-strings]: string length ‘5139’ is greater than the length ‘4095’ ISO C99 compilers are required to support
#  726 |             "Target architecture: " FREERDP_TARGET_ARCH "\n";
#      |             ^~~~~~~~~~~~~~~~~~~~~~~
#  724|   	    "CFLAGS:              " FREERDP_CFLAGS "\n"
#  725|   	    "Compiler:            " FREERDP_COMPILER_ID ", " FREERDP_COMPILER_VERSION "\n"
#  726|-> 	    "Target architecture: " FREERDP_TARGET_ARCH "\n";
#  727|   	return build_config;
#  728|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def29]
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/license.c: scope_hint: In function ‘license_read_binary_blob_data’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/license.c:1478:9: warning[-Wanalyzer-malloc-leak]: leak of ‘*blob.data’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/license.c:2614:9: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/license.c:1494:9: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/license.c:446:9: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/collections.h:34: included_from: Included from here.
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/license.c:1499:9: note: in expansion of macro ‘Stream_Read_UINT16’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/license.c:1499:9: note: in expansion of macro ‘Stream_Read_UINT16’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:169:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:170:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:62:39: note: in definition of macro ‘WINPR_STREAM_CAST’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:127:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:128:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/license.c:1499:9: note: in expansion of macro ‘Stream_Read_UINT16’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/license.c:1500:9: note: in expansion of macro ‘Stream_Read_UINT16’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:169:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:170:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:62:39: note: in definition of macro ‘WINPR_STREAM_CAST’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:127:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:128:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/license.c:1500:9: note: in expansion of macro ‘Stream_Read_UINT16’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/license.c:446:9: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:716:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/license.c: scope_hint: In function ‘license_read_binary_blob_data’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/license.c:1445:9: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/license.c:1446:9: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/license.c:1446:9: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/license.c:1447:9: note: in expansion of macro ‘WINPR_ASSERT’
# 1476|   		return FALSE;
# 1477|   	}
# 1478|-> 	memcpy(blob->data, data, blob->length); /* blobData */
# 1479|   	return TRUE;
# 1480|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def30]
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/license.c: scope_hint: In function ‘license_scope_list_resize’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/license.c:1703:26: warning[-Wanalyzer-malloc-leak]: leak of ‘tmp’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/license.c:2836:9: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/license.c:2837:9: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/license.c:2853:9: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/license.c:2854:9: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/license.c:2854:9: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/license.c:2855:9: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/license.c:2855:9: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/license.c:2856:9: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/license.c:2744:9: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/license.c:415:9: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/license.c:2807:9: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/license.c:2808:9: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/license.c:2808:9: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/license.c:2809:9: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/license.c:2809:9: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/license.c:2810:9: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/license.c:2810:9: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/license.c:2807:9: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/license.c:2808:9: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/license.c:2808:9: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/license.c:2809:9: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/license.c:2809:9: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/license.c:2810:9: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/license.c:2810:9: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/license.c:1445:9: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/license.c:1446:9: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/license.c:1446:9: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/license.c:1447:9: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:756:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:757:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:62:39: note: in definition of macro ‘WINPR_STREAM_CAST’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/license.c:1445:9: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/license.c:1446:9: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/license.c:1446:9: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/license.c:1447:9: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/assert.h:27: included_from: Included from here.
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/wlog.h:205:29: note: in expansion of macro ‘WLog_Print_tag’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/license.c:1465:17: note: in expansion of macro ‘WLog_WARN’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/wlog.h:152:17: note: in expansion of macro ‘WLog_Print’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/wlog.h:205:29: note: in expansion of macro ‘WLog_Print_tag’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/license.c:1465:17: note: in expansion of macro ‘WLog_WARN’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/license.c:1467:24: note: in expansion of macro ‘TRUE’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/license.c:1670:9: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
# 1701|   	}
# 1702|   
# 1703|-> 	scopeList->count = count;
# 1704|   	return TRUE;
# 1705|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def31]
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/orders.c:2243:9: warning[-Wanalyzer-malloc-leak]: leak of ‘update_read_cache_bitmap_order(update,  s,  compressed, (int)stream_read_u16_le(s, 1))’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/update.h:131:9: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/orders.c: scope_hint: In function ‘update_read_cache_bitmap_order’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:103:9: note: in expansion of macro ‘Stream_CheckAndLogRequiredLengthOfSize’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/orders.c:4293:14: note: in expansion of macro ‘Stream_CheckAndLogRequiredLength’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/orders.c:4296:9: note: in expansion of macro ‘Stream_Read_UINT8’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/orders.c:4296:9: note: in expansion of macro ‘Stream_Read_UINT8’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:147:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:148:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:62:39: note: in definition of macro ‘WINPR_STREAM_CAST’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:127:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:128:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/orders.c:4296:9: note: in expansion of macro ‘Stream_Read_UINT8’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/update.h:131:9: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/orders.c: scope_hint: In function ‘update_read_cache_bitmap_order’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/orders.c:3938:9: note: in expansion of macro ‘Stream_Read_INT16’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/orders.c:3938:9: note: in expansion of macro ‘Stream_Read_INT16’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:193:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:194:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:62:39: note: in definition of macro ‘WINPR_STREAM_CAST’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:127:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:128:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/orders.c:3938:9: note: in expansion of macro ‘Stream_Read_INT16’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/orders.c:3939:9: note: in expansion of macro ‘Stream_Read_UINT16’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:169:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:170:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:62:39: note: in definition of macro ‘WINPR_STREAM_CAST’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:127:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:128:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/orders.c:3939:9: note: in expansion of macro ‘Stream_Read_UINT16’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/orders.c:3940:9: note: in expansion of macro ‘Stream_Read_UINT8’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:147:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:148:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:62:39: note: in definition of macro ‘WINPR_STREAM_CAST’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:127:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:128:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/orders.c:3940:9: note: in expansion of macro ‘Stream_Read_UINT8’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:756:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:757:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:62:39: note: in definition of macro ‘WINPR_STREAM_CAST’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:103:9: note: in expansion of macro ‘Stream_CheckAndLogRequiredLengthOfSize’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/orders.c:3965:14: note: in expansion of macro ‘Stream_CheckAndLogRequiredLength’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/update.h:131:9: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/orders.c: scope_hint: In function ‘update_read_cache_bitmap_order’
# 2241|   	WINPR_PRAGMA_DIAG_PUSH
# 2242|   	WINPR_PRAGMA_DIAG_IGNORED_MISMATCHED_DEALLOC
# 2243|-> 	free_cache_bitmap_order(update->context, cache_bitmap);
# 2244|   	WINPR_PRAGMA_DIAG_POP
# 2245|   	return NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def32]
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/orders.c:2617:9: warning[-Wanalyzer-malloc-leak]: leak of ‘update_read_cache_color_table_order(update,  s, (int)stream_read_u16_le(s, 1))’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/update.h:131:9: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/orders.c: scope_hint: In function ‘update_read_cache_color_table_order’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:103:9: note: in expansion of macro ‘Stream_CheckAndLogRequiredLengthOfSize’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/orders.c:4293:14: note: in expansion of macro ‘Stream_CheckAndLogRequiredLength’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/orders.c:4296:9: note: in expansion of macro ‘Stream_Read_UINT8’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/orders.c:4296:9: note: in expansion of macro ‘Stream_Read_UINT8’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:147:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:148:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:62:39: note: in definition of macro ‘WINPR_STREAM_CAST’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:127:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:128:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/orders.c:4296:9: note: in expansion of macro ‘Stream_Read_UINT8’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/update.h:131:9: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/orders.c: scope_hint: In function ‘update_read_cache_color_table_order’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/orders.c:3938:9: note: in expansion of macro ‘Stream_Read_INT16’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/orders.c:3938:9: note: in expansion of macro ‘Stream_Read_INT16’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:193:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:194:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:62:39: note: in definition of macro ‘WINPR_STREAM_CAST’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:127:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:128:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/orders.c:3938:9: note: in expansion of macro ‘Stream_Read_INT16’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/orders.c:3939:9: note: in expansion of macro ‘Stream_Read_UINT16’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:169:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:170:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:62:39: note: in definition of macro ‘WINPR_STREAM_CAST’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:127:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:128:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/orders.c:3939:9: note: in expansion of macro ‘Stream_Read_UINT16’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/orders.c:3940:9: note: in expansion of macro ‘Stream_Read_UINT8’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:147:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:148:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:62:39: note: in definition of macro ‘WINPR_STREAM_CAST’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:127:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:128:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/orders.c:3940:9: note: in expansion of macro ‘Stream_Read_UINT8’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:756:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:757:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:62:39: note: in definition of macro ‘WINPR_STREAM_CAST’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:103:9: note: in expansion of macro ‘Stream_CheckAndLogRequiredLengthOfSize’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/orders.c:3965:14: note: in expansion of macro ‘Stream_CheckAndLogRequiredLength’
# 2615|   	WINPR_PRAGMA_DIAG_PUSH
# 2616|   	WINPR_PRAGMA_DIAG_IGNORED_MISMATCHED_DEALLOC
# 2617|-> 	free_cache_color_table_order(update->context, cache_color_table);
# 2618|   	WINPR_PRAGMA_DIAG_POP
# 2619|   	return NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def33]
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/orders.c: scope_hint: In function ‘update_read_cache_brush_order’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/orders.c:2985:16: warning[-Wanalyzer-malloc-leak]: leak of ‘cache_brush’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/update.h:131:9: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/orders.c: scope_hint: In function ‘update_read_cache_brush_order’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:103:9: note: in expansion of macro ‘Stream_CheckAndLogRequiredLengthOfSize’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/orders.c:4293:14: note: in expansion of macro ‘Stream_CheckAndLogRequiredLength’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/orders.c:4296:9: note: in expansion of macro ‘Stream_Read_UINT8’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/orders.c:4296:9: note: in expansion of macro ‘Stream_Read_UINT8’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:147:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:148:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:62:39: note: in definition of macro ‘WINPR_STREAM_CAST’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:127:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:128:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/orders.c:4296:9: note: in expansion of macro ‘Stream_Read_UINT8’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/update.h:131:9: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/orders.c: scope_hint: In function ‘update_read_cache_brush_order’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/orders.c:3938:9: note: in expansion of macro ‘Stream_Read_INT16’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/orders.c:3938:9: note: in expansion of macro ‘Stream_Read_INT16’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:193:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:194:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:62:39: note: in definition of macro ‘WINPR_STREAM_CAST’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:127:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:128:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/orders.c:3938:9: note: in expansion of macro ‘Stream_Read_INT16’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/orders.c:3939:9: note: in expansion of macro ‘Stream_Read_UINT16’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:169:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:170:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:62:39: note: in definition of macro ‘WINPR_STREAM_CAST’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:127:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:128:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/orders.c:3939:9: note: in expansion of macro ‘Stream_Read_UINT16’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/orders.c:3940:9: note: in expansion of macro ‘Stream_Read_UINT8’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:147:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:148:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:62:39: note: in definition of macro ‘WINPR_STREAM_CAST’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:127:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:128:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/orders.c:3940:9: note: in expansion of macro ‘Stream_Read_UINT8’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:756:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:757:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:62:39: note: in definition of macro ‘WINPR_STREAM_CAST’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:103:9: note: in expansion of macro ‘Stream_CheckAndLogRequiredLengthOfSize’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/orders.c:3965:14: note: in expansion of macro ‘Stream_CheckAndLogRequiredLength’
# 2983|   	}
# 2984|   
# 2985|-> 	return cache_brush;
# 2986|   fail:
# 2987|   	free_cache_brush_order(update->context, cache_brush);

Error: COMPILER_WARNING: [#def34]
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/rdp.c: scope_hint: In function ‘log_build_warn’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/rdp.c:2855:9: warning[-Woverlength-strings]: string length ‘4321’ is greater than the length ‘4095’ ISO C99 compilers are required to support
# 2855 |         size_t len = sizeof(FREERDP_BUILD_CONFIG);
#      |         ^~~~~~
# 2853|   {
# 2854|   	WINPR_ASSERT(rdp);
# 2855|-> 	size_t len = sizeof(FREERDP_BUILD_CONFIG);
# 2856|   	char* list = calloc(len, sizeof(char));
# 2857|   	char* config = _strdup(FREERDP_BUILD_CONFIG);

Error: COMPILER_WARNING: [#def35]
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/rdp.c:2857:9: warning[-Woverlength-strings]: string length ‘4321’ is greater than the length ‘4095’ ISO C99 compilers are required to support
# 2857 |         char* config = _strdup(FREERDP_BUILD_CONFIG);
#      |         ^~~~
# 2855|   	size_t len = sizeof(FREERDP_BUILD_CONFIG);
# 2856|   	char* list = calloc(len, sizeof(char));
# 2857|-> 	char* config = _strdup(FREERDP_BUILD_CONFIG);
# 2858|   	if (config && list)
# 2859|   	{

Error: COMPILER_WARNING: [#def36]
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/transport.c:329:60: warning[-Wpedantic]: ISO C forbids conversion of object pointer to function pointer type
#  329 |         BIO_callback_ctrl(tls->bio, BIO_CTRL_SET_CALLBACK, (bio_info_cb*)(void*)transport_ssl_cb);
#      |                                                            ^
#  327|   
#  328|   	transport->frontBio = tls->bio;
#  329|-> 	BIO_callback_ctrl(tls->bio, BIO_CTRL_SET_CALLBACK, (bio_info_cb*)(void*)transport_ssl_cb);
#  330|   	SSL_set_app_data(tls->ssl, transport);
#  331|   

Error: COMPILER_WARNING: [#def37]
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/transport.c: scope_hint: In function ‘transport_default_connect_tls’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/transport.c:329:74: warning[-Wpedantic]: ISO C forbids conversion of function pointer to object pointer type
#  329 |         BIO_callback_ctrl(tls->bio, BIO_CTRL_SET_CALLBACK, (bio_info_cb*)(void*)transport_ssl_cb);
#      |                                                                          ^
#  327|   
#  328|   	transport->frontBio = tls->bio;
#  329|-> 	BIO_callback_ctrl(tls->bio, BIO_CTRL_SET_CALLBACK, (bio_info_cb*)(void*)transport_ssl_cb);
#  330|   	SSL_set_app_data(tls->ssl, transport);
#  331|   

Error: COMPILER_WARNING: [#def38]
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/crypto/tls.c:538:37: warning[-Wpedantic]: ISO C forbids conversion of object pointer to function pointer type
#  538 |                         fkt_t fkt = (fkt_t)(void*)fp;
#      |                                     ^
#  536|   			 * the argument is not really of type bio_info_cb* and must be cast
#  537|   			 * to the required type */
#  538|-> 			fkt_t fkt = (fkt_t)(void*)fp;
#  539|   			SSL_set_info_callback(tls->ssl, fkt);
#  540|   			status = 1;

Error: COMPILER_WARNING: [#def39]
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/crypto/tls.c: scope_hint: In function ‘bio_rdp_tls_callback_ctrl’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/crypto/tls.c:538:44: warning[-Wpedantic]: ISO C forbids conversion of function pointer to object pointer type
#  538 |                         fkt_t fkt = (fkt_t)(void*)fp;
#      |                                            ^
#  536|   			 * the argument is not really of type bio_info_cb* and must be cast
#  537|   			 * to the required type */
#  538|-> 			fkt_t fkt = (fkt_t)(void*)fp;
#  539|   			SSL_set_info_callback(tls->ssl, fkt);
#  540|   			status = 1;

Error: COMPILER_WARNING (CWE-1164): [#def40]
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/crypto/x509_utils.c:617:14: warning[-Wunused-function]: ‘x509_utils_get_pem’ defined but not used
#  617 | static BYTE* x509_utils_get_pem(const X509* xcert, const STACK_OF(X509) * chain, size_t* plength)
#      |              ^~~~~~~~~~~~~~~~~~
#  615|   }
#  616|   
#  617|-> static BYTE* x509_utils_get_pem(const X509* xcert, const STACK_OF(X509) * chain, size_t* plength)
#  618|   {
#  619|   	BIO* bio = NULL;

Error: COMPILER_WARNING (CWE-1164): [#def41]
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/emu/scard/smartcard_emulate.c:207:13: warning[-Wunused-function]: ‘char_compare’ defined but not used
#  207 | static BOOL char_compare(const void* a, const void* b)
#      |             ^~~~~~~~~~~~
#  205|   }
#  206|   
#  207|-> static BOOL char_compare(const void* a, const void* b)
#  208|   {
#  209|   	const CHAR* wa = a;

Error: COMPILER_WARNING (CWE-1164): [#def42]
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/emu/scard/smartcard_emulate.c:219:13: warning[-Wunused-function]: ‘wchar_compare’ defined but not used
#  219 | static BOOL wchar_compare(const void* a, const void* b)
#      |             ^~~~~~~~~~~~~
#  217|   }
#  218|   
#  219|-> static BOOL wchar_compare(const void* a, const void* b)
#  220|   {
#  221|   	const WCHAR* wa = a;

Error: COMPILER_WARNING (CWE-1164): [#def43]
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/locale/keyboard_layout.c:1109:13: warning[-Wunused-function]: ‘parse_json_layout_entry’ defined but not used
# 1109 | static BOOL parse_json_layout_entry(WINPR_JSON* json, size_t pos, RDP_KEYBOARD_LAYOUT* entry)
#      |             ^~~~~~~~~~~~~~~~~~~~~~~
# 1107|   }
# 1108|   
# 1109|-> static BOOL parse_json_layout_entry(WINPR_JSON* json, size_t pos, RDP_KEYBOARD_LAYOUT* entry)
# 1110|   {
# 1111|   	WINPR_ASSERT(entry);

Error: COMPILER_WARNING: [#def44]
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/primitives/sse/prim_copy_avx2.c: scope_hint: In function ‘avx2_image_copy_bgr24_bgrx32’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/primitives/sse/prim_copy_avx2.c:55:23: warning[-Wpsabi]: AVX vector return without AVX enabled changes the ABI
#   53|   	const SSIZE_T dstByte = 4;
#   54|   
#   55|-> 	const __m256i mask = _mm256_set_epi32(0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF);
#   56|   	const SSIZE_T rem = nWidth % 8;
#   57|   	const SSIZE_T width = nWidth - rem;

Error: COMPILER_WARNING: [#def45]
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/assert.h:26: included_from: Included from here.
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/codec/dsp.c:22: included_from: Included from here.
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/codec/dsp.c: scope_hint: In function ‘freerdp_dsp_supports_format’
freerdp-3.8.0-build/FreeRDP-3.8.0/redhat-linux-build/winpr/include/winpr/wtypes.h:40:27: warning[-Wpedantic]: a label can only be part of a statement and a declaration is not a statement
#   40 | #define WINPR_FALLTHROUGH __attribute__((fallthrough));
#      |                           ^~~~~~~~~~~~~
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/codec/dsp.c:1438:25: note: in expansion of macro ‘WINPR_FALLTHROUGH’
# 1438 |                         WINPR_FALLTHROUGH
#      |                         ^~~~~~~~~~~~~~~~~
#   38|   #define WINPR_FALLTHROUGH __attribute__((fallthrough));
#   39|   #elif defined(__GNUC__) && (__GNUC__ >= 7)
#   40|-> #define WINPR_FALLTHROUGH __attribute__((fallthrough));
#   41|   #else
#   42|   #define WINPR_FALLTHROUGH

Error: COMPILER_WARNING: [#def46]
freerdp-3.8.0-build/FreeRDP-3.8.0/server/proxy/pf_client.c:198:19: warning[-Wpedantic]: ISO C forbids conversion of object pointer to function pointer type
#  198 |         entryEx = (PVIRTUALCHANNELENTRYEX)(void*)freerdp_load_channel_addin_entry(
#      |                   ^
#  196|   	PVIRTUALCHANNELENTRY entry = NULL;
#  197|   	PVIRTUALCHANNELENTRYEX entryEx = NULL;
#  198|-> 	entryEx = (PVIRTUALCHANNELENTRYEX)(void*)freerdp_load_channel_addin_entry(
#  199|   	    name, NULL, NULL, FREERDP_ADDIN_CHANNEL_STATIC | FREERDP_ADDIN_CHANNEL_ENTRYEX);
#  200|   

Error: COMPILER_WARNING: [#def47]
freerdp-3.8.0-build/FreeRDP-3.8.0/server/proxy/pf_client.c: scope_hint: In function ‘freerdp_client_load_static_channel_addin’
freerdp-3.8.0-build/FreeRDP-3.8.0/server/proxy/pf_client.c:198:43: warning[-Wpedantic]: ISO C forbids conversion of function pointer to object pointer type
#  198 |         entryEx = (PVIRTUALCHANNELENTRYEX)(void*)freerdp_load_channel_addin_entry(
#      |                                           ^
#  196|   	PVIRTUALCHANNELENTRY entry = NULL;
#  197|   	PVIRTUALCHANNELENTRYEX entryEx = NULL;
#  198|-> 	entryEx = (PVIRTUALCHANNELENTRYEX)(void*)freerdp_load_channel_addin_entry(
#  199|   	    name, NULL, NULL, FREERDP_ADDIN_CHANNEL_STATIC | FREERDP_ADDIN_CHANNEL_ENTRYEX);
#  200|   

Error: COMPILER_WARNING: [#def48]
freerdp-3.8.0-build/FreeRDP-3.8.0/server/proxy/pf_modules.c: scope_hint: In function ‘pf_modules_load_module’
freerdp-3.8.0-build/FreeRDP-3.8.0/server/proxy/pf_modules.c:496:23: warning[-Wpedantic]: ISO C forbids conversion of object pointer to function pointer type
#  496 |         pEntryPoint = (proxyModuleEntryPoint)GetProcAddress(handle, MODULE_ENTRY_POINT);
#      |                       ^
#  494|   	}
#  495|   
#  496|-> 	pEntryPoint = (proxyModuleEntryPoint)GetProcAddress(handle, MODULE_ENTRY_POINT);
#  497|   	if (!pEntryPoint)
#  498|   	{

Error: GCC_ANALYZER_WARNING (CWE-416): [#def49]
freerdp-3.8.0-build/FreeRDP-3.8.0/server/proxy/pf_server.c: scope_hint: In function ‘pf_server_stop.part.0’
freerdp-3.8.0-build/FreeRDP-3.8.0/server/proxy/pf_server.c:1032:9: warning[-Wanalyzer-use-after-free]: use after ‘pf_server_free’ of ‘server’
freerdp-3.8.0-build/FreeRDP-3.8.0/server/proxy/pf_server.c:916:9: note: in expansion of macro ‘WINPR_ASSERT’
# 1030|   
# 1031|   	/* signal main thread to stop and wait for the thread to exit */
# 1032|-> 	SetEvent(server->stopEvent);
# 1033|   }
# 1034|   

Error: COMPILER_WARNING (CWE-1164): [#def50]
freerdp-3.8.0-build/FreeRDP-3.8.0/uwac/libuwac/uwac-display.c:317:14: warning[-Wunused-function]: ‘display_bind’ defined but not used
#  317 | static void* display_bind(UwacDisplay* display, uint32_t name, const struct wl_interface* interface,
#      |              ^~~~~~~~~~~~
#  315|   }
#  316|   
#  317|-> static void* display_bind(UwacDisplay* display, uint32_t name, const struct wl_interface* interface,
#  318|                             uint32_t version)
#  319|   {

Error: COMPILER_WARNING (CWE-1164): [#def51]
freerdp-3.8.0-build/FreeRDP-3.8.0/uwac/libuwac/uwac-display.c: scope_hint: At top level
freerdp-3.8.0-build/FreeRDP-3.8.0/uwac/libuwac/uwac-display.c:334:13: warning[-Wunused-function]: ‘UwacDisplayUnwatchFd’ defined but not used
#  334 | static void UwacDisplayUnwatchFd(UwacDisplay* display, int fd)
#      |             ^~~~~~~~~~~~~~~~~~~~
#  332|   }
#  333|   
#  334|-> static void UwacDisplayUnwatchFd(UwacDisplay* display, int fd)
#  335|   {
#  336|   	epoll_ctl(display->epoll_fd, EPOLL_CTL_DEL, fd, NULL);

Error: COMPILER_WARNING: [#def52]
freerdp-3.8.0-build/FreeRDP-3.8.0/uwac/libuwac/uwac-display.c:23: included_from: Included from here.
freerdp-3.8.0-build/FreeRDP-3.8.0/uwac/libuwac/uwac-display.c: scope_hint: In function ‘registry_handle_global’
freerdp-3.8.0-build/FreeRDP-3.8.0/uwac/libuwac/uwac-utils.h:29:9: warning[-Wpedantic]: ISO C forbids braced-groups within expressions
#   29 |         ({                          \
#      |         ^
freerdp-3.8.0-build/FreeRDP-3.8.0/uwac/libuwac/uwac-display.c:156:50: note: in expansion of macro ‘min’
#  156 |                                                  min(TARGET_COMPOSITOR_INTERFACE, version));
#      |                                                  ^~~
#   27|   
#   28|   #define min(a, b)               \
#   29|-> 	({                          \
#   30|   		__typeof__(a) _a = (a); \
#   31|   		__typeof__(b) _b = (b); \

Error: COMPILER_WARNING: [#def53]
freerdp-3.8.0-build/FreeRDP-3.8.0/uwac/libuwac/uwac-display.c: scope_hint: In function ‘display_dispatch_events’
freerdp-3.8.0-build/FreeRDP-3.8.0/uwac/libuwac/uwac-utils.h:36:9: warning[-Wpedantic]: ISO C forbids braced-groups within expressions
#   36 |         ({                                                   \
#      |         ^
freerdp-3.8.0-build/FreeRDP-3.8.0/uwac/libuwac/uwac-display.c:346:32: note: in expansion of macro ‘container_of’
#  346 |         UwacDisplay* display = container_of(task, UwacDisplay, dispatch_fd_task);
#      |                                ^~~~~~~~~~~~
#   34|   
#   35|   #define container_of(ptr, type, member)                  \
#   36|-> 	({                                                   \
#   37|   		__typeof__(((type*)0)->member)* __mptr = (ptr);  \
#   38|   		(type*)((char*)__mptr - offsetof(type, member)); \

Error: GCC_ANALYZER_WARNING (CWE-401): [#def54]
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/collections.h:34: included_from: Included from here.
freerdp-3.8.0-build/FreeRDP-3.8.0/include/freerdp/types.h:139: included_from: Included from here.
freerdp-3.8.0-build/FreeRDP-3.8.0/include/freerdp/settings_types_private.h:29: included_from: Included from here.
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/settings.h:30: included_from: Included from here.
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/orders.c:24: included_from: Included from here.
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h: scope_hint: In function ‘update_recv_secondary_order’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:150:63: warning[-Wanalyzer-malloc-leak]: leak of ‘update_read_cache_brush_order(update,  s, (int)stream_read_u16_le(s, 1))’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:62:39: note: in definition of macro ‘WINPR_STREAM_CAST’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/update.h:131:9: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/orders.c: scope_hint: In function ‘update_recv_secondary_order’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:103:9: note: in expansion of macro ‘Stream_CheckAndLogRequiredLengthOfSize’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/orders.c:4293:14: note: in expansion of macro ‘Stream_CheckAndLogRequiredLength’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/orders.c:4296:9: note: in expansion of macro ‘Stream_Read_UINT8’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/orders.c:4296:9: note: in expansion of macro ‘Stream_Read_UINT8’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:147:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:148:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:62:39: note: in definition of macro ‘WINPR_STREAM_CAST’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:127:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:128:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/orders.c:4296:9: note: in expansion of macro ‘Stream_Read_UINT8’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/update.h:131:9: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/orders.c: scope_hint: In function ‘update_recv_secondary_order’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/orders.c:3938:9: note: in expansion of macro ‘Stream_Read_INT16’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/orders.c:3938:9: note: in expansion of macro ‘Stream_Read_INT16’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:193:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:194:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:62:39: note: in definition of macro ‘WINPR_STREAM_CAST’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:127:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:128:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/orders.c:3938:9: note: in expansion of macro ‘Stream_Read_INT16’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/orders.c:3939:9: note: in expansion of macro ‘Stream_Read_UINT16’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:169:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:170:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:62:39: note: in definition of macro ‘WINPR_STREAM_CAST’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:127:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:128:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/orders.c:3939:9: note: in expansion of macro ‘Stream_Read_UINT16’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/orders.c:3940:9: note: in expansion of macro ‘Stream_Read_UINT8’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:147:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:148:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:62:39: note: in definition of macro ‘WINPR_STREAM_CAST’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:127:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:128:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/orders.c:3940:9: note: in expansion of macro ‘Stream_Read_UINT8’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:756:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:757:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:62:39: note: in definition of macro ‘WINPR_STREAM_CAST’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:103:9: note: in expansion of macro ‘Stream_CheckAndLogRequiredLengthOfSize’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/orders.c:3965:14: note: in expansion of macro ‘Stream_CheckAndLogRequiredLength’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/update.h:131:9: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/orders.c: scope_hint: In function ‘update_recv_secondary_order’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:103:9: note: in expansion of macro ‘Stream_CheckAndLogRequiredLengthOfSize’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/orders.c:2916:14: note: in expansion of macro ‘Stream_CheckAndLogRequiredLength’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/orders.c:2919:9: note: in expansion of macro ‘Stream_Read_UINT8’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/orders.c:2919:9: note: in expansion of macro ‘Stream_Read_UINT8’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:147:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:148:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:62:39: note: in definition of macro ‘WINPR_STREAM_CAST’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:127:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:128:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/orders.c:2919:9: note: in expansion of macro ‘Stream_Read_UINT8’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/orders.c:2920:9: note: in expansion of macro ‘Stream_Read_UINT8’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:147:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:148:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:62:39: note: in definition of macro ‘WINPR_STREAM_CAST’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:127:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:128:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/orders.c:2920:9: note: in expansion of macro ‘Stream_Read_UINT8’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/orders.c:2926:9: note: in expansion of macro ‘Stream_Read_UINT8’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/orders.c:2926:9: note: in expansion of macro ‘Stream_Read_UINT8’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:147:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:148:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:62:39: note: in definition of macro ‘WINPR_STREAM_CAST’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:127:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:128:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/orders.c:2926:9: note: in expansion of macro ‘Stream_Read_UINT8’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/orders.c:2927:9: note: in expansion of macro ‘Stream_Read_UINT8’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:147:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:148:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:62:39: note: in definition of macro ‘WINPR_STREAM_CAST’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:127:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:128:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/orders.c:2927:9: note: in expansion of macro ‘Stream_Read_UINT8’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/orders.c:2930:9: note: in expansion of macro ‘Stream_Read_UINT8’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:147:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:148:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:62:39: note: in definition of macro ‘WINPR_STREAM_CAST’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:127:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:128:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/orders.c:2930:9: note: in expansion of macro ‘Stream_Read_UINT8’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/orders.c:2931:9: note: in expansion of macro ‘Stream_Read_UINT8’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:147:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:148:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:62:39: note: in definition of macro ‘WINPR_STREAM_CAST’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:127:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:128:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/orders.c:2931:9: note: in expansion of macro ‘Stream_Read_UINT8’
freerdp-3.8.0-build/FreeRDP-3.8.0/include/freerdp/settings_types_private.h:30: included_from: Included from here.
freerdp-3.8.0-build/FreeRDP-3.8.0/include/freerdp/api.h:103:11: note: in definition of macro ‘IFCALLRESULT’
freerdp-3.8.0-build/FreeRDP-3.8.0/libfreerdp/core/orders.c:4072:46: note: in expansion of macro ‘IFCALLRESULT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/stream.h:62:39: note: in definition of macro ‘WINPR_STREAM_CAST’
#  148|   		WINPR_ASSERT(Stream_GetRemainingLength(_s) >= sizeof(UINT8));
#  149|   
#  150|-> 		const UINT8 v = WINPR_STREAM_CAST(UINT8, *(_s)->pointer);
#  151|   		if (seek)
#  152|   			Stream_Seek(_s, sizeof(UINT8));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def55]
freerdp-3.8.0-build/FreeRDP-3.8.0/channels/rdpdr/server/rdpdr_main.c: scope_hint: In function ‘rdpdr_server_drive_delete_directory’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/wlog.h:140:20: warning[-Wanalyzer-malloc-leak]: leak of ‘irp’
freerdp-3.8.0-build/FreeRDP-3.8.0/channels/rdpdr/server/rdpdr_main.c:2267:17: note: in expansion of macro ‘WLog_Print’
freerdp-3.8.0-build/FreeRDP-3.8.0/channels/rdpdr/server/rdpdr_main.c: scope_hint: In function ‘rdpdr_server_drive_delete_directory’
freerdp-3.8.0-build/FreeRDP-3.8.0/channels/rdpdr/server/rdpdr_main.c:2710:9: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/channels/rdpdr/server/rdpdr_main.c:2711:9: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/channels/rdpdr/server/rdpdr_main.c:2712:9: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/channels/rdpdr/server/rdpdr_main.c:2712:9: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/channels/rdpdr/server/rdpdr_main.c:2712:9: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/channels/rdpdr/server/rdpdr_main.c:2491:9: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/channels/rdpdr/server/rdpdr_main.c:189:9: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/channels/rdpdr/server/rdpdr_main.c:190:9: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/channels/rdpdr/server/rdpdr_main.c:2253:9: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/channels/rdpdr/server/rdpdr_main.c:2254:9: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/channels/rdpdr/server/rdpdr_main.c:2256:9: note: in expansion of macro ‘WLog_Print’
freerdp-3.8.0-build/FreeRDP-3.8.0/channels/rdpdr/server/rdpdr_main.c:2256:9: note: in expansion of macro ‘WLog_Print’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/wlog.h:140:40: note: in definition of macro ‘WLog_Print’
freerdp-3.8.0-build/FreeRDP-3.8.0/channels/rdpdr/server/rdpdr_main.c:2267:17: note: in expansion of macro ‘WLog_Print’
#  138|   	do                                                             \
#  139|   	{                                                              \
#  140|-> 		if (WLog_IsLevelActive(_log, _log_level))                  \
#  141|   		{                                                          \
#  142|   			WLog_Print_unchecked(_log, _log_level, ##__VA_ARGS__); \

Error: GCC_ANALYZER_WARNING (CWE-401): [#def56]
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/libwinpr/clipboard/synthetic_file.c:328:36: warning[-Wanalyzer-malloc-leak]: leak of ‘make_synthetic_file(local_name,  remote_name)’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/libwinpr/clipboard/synthetic_file.c: scope_hint: In function ‘add_file_to_list’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/libwinpr/clipboard/synthetic_file.c:569:9: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/libwinpr/clipboard/synthetic_file.c:573:9: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/libwinpr/clipboard/synthetic_file.c:390:9: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/libwinpr/clipboard/synthetic_file.c:364:9: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/libwinpr/clipboard/synthetic_file.c:365:9: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/libwinpr/clipboard/synthetic_file.c:365:9: note: in expansion of macro ‘WINPR_ASSERT’
#  326|   	}
#  327|   
#  328|-> 	if (file->dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
#  329|   	{
#  330|   		/*

Error: GCC_ANALYZER_WARNING (CWE-775): [#def57]
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/libwinpr/comm/comm.c: scope_hint: In function ‘CommCreateFileA’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/libwinpr/comm/comm.c:1349:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/libwinpr/comm/comm.c:1076:13: note: in expansion of macro ‘_tcslen’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/libwinpr/comm/comm.c:1082:9: note: in expansion of macro ‘_tcscpy’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/libwinpr/comm/comm.c:31: included_from: Included from here.
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/libwinpr/comm/comm.c: scope_hint: In function ‘CommCreateFileA’
# 1347|   	WINPR_PRAGMA_DIAG_PUSH
# 1348|   	WINPR_PRAGMA_DIAG_IGNORED_MISMATCHED_DEALLOC
# 1349|-> 	CloseHandle(pComm);
# 1350|   	WINPR_PRAGMA_DIAG_POP
# 1351|   	return INVALID_HANDLE_VALUE;

Error: GCC_ANALYZER_WARNING (CWE-762): [#def58]
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/libwinpr/comm/comm.c:1349:9: warning[-Wanalyzer-mismatching-deallocation]: ‘pComm’ should have been deallocated with ‘free’ but was deallocated with ‘CloseHandle’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/libwinpr/comm/comm.c:1076:13: note: in expansion of macro ‘_tcslen’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/libwinpr/comm/comm.c:1082:9: note: in expansion of macro ‘_tcscpy’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/libwinpr/comm/comm.c: scope_hint: In function ‘CommCreateFileA’
# 1347|   	WINPR_PRAGMA_DIAG_PUSH
# 1348|   	WINPR_PRAGMA_DIAG_IGNORED_MISMATCHED_DEALLOC
# 1349|-> 	CloseHandle(pComm);
# 1350|   	WINPR_PRAGMA_DIAG_POP
# 1351|   	return INVALID_HANDLE_VALUE;

Error: COMPILER_WARNING (CWE-704): [#def59]
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/libwinpr/crypto/hash.c: scope_hint: In function ‘winpr_HMAC_Init’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/libwinpr/crypto/hash.c:239:83: warning[-Wdiscarded-qualifiers]: passing argument 2 of ‘OSSL_PARAM_construct_utf8_string’ discards ‘const’ qualifier from pointer target type
#  239 |         const OSSL_PARAM param[] = { OSSL_PARAM_construct_utf8_string(param_name, hash, 0),
#      |                                                                                   ^~~~
/usr/include/openssl/evp.h:32: included_from: Included from here.
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/libwinpr/crypto/hash.c:29: included_from: Included from here.
/usr/include/openssl/params.h:88:68: note: expected ‘char *’ but argument is of type ‘const char *’
#   88 | OSSL_PARAM OSSL_PARAM_construct_utf8_string(const char *key, char *buf,
#      |                                                              ~~~~~~^~~
#  237|   
#  238|   	const char* param_name = OSSL_MAC_PARAM_DIGEST;
#  239|-> 	const OSSL_PARAM param[] = { OSSL_PARAM_construct_utf8_string(param_name, hash, 0),
#  240|   		                         OSSL_PARAM_construct_end() };
#  241|   

Error: COMPILER_WARNING: [#def60]
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/libwinpr/ncrypt/ncrypt_pkcs11.c: scope_hint: In function ‘NCryptOpenP11StorageProviderEx’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/libwinpr/ncrypt/ncrypt_pkcs11.c:1265:39: warning[-Wpedantic]: ISO C forbids conversion of object pointer to function pointer type
# 1265 |                 c_get_function_list = (c_get_function_list_t)GetProcAddress(library, "C_GetFunctionList");
#      |                                       ^
# 1263|   		}
# 1264|   
# 1265|-> 		c_get_function_list = (c_get_function_list_t)GetProcAddress(library, "C_GetFunctionList");
# 1266|   		if (!c_get_function_list)
# 1267|   		{

Error: COMPILER_WARNING: [#def61]
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/assert.h:27: included_from: Included from here.
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/libwinpr/thread/thread.c:25: included_from: Included from here.
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/libwinpr/thread/thread.c: scope_hint: In function ‘thread_launcher’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/libwinpr/thread/thread.c:530:65: warning[-Wpedantic]: ISO C forbids conversion of function pointer to object pointer type
#  530 |                 WLog_ERR(TAG, "Thread function argument is %p", (void*)fkt);
#      |                                                                 ^
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/wlog.h:134:35: note: in definition of macro ‘WLog_Print_unchecked’
#  134 |                                   __VA_ARGS__);                                                      \
#      |                                   ^~~~~~~~~~~
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/wlog.h:152:17: note: in expansion of macro ‘WLog_Print’
#  152 |                 WLog_Print(_log_cached_ptr, _log_level, __VA_ARGS__); \
#      |                 ^~~~~~~~~~
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/include/winpr/wlog.h:206:28: note: in expansion of macro ‘WLog_Print_tag’
#  206 | #define WLog_ERR(tag, ...) WLog_Print_tag(tag, WLOG_ERROR, __VA_ARGS__)
#      |                            ^~~~~~~~~~~~~~
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/libwinpr/thread/thread.c:530:17: note: in expansion of macro ‘WLog_ERR’
#  530 |                 WLog_ERR(TAG, "Thread function argument is %p", (void*)fkt);
#      |                 ^~~~~~~~
#  528|   	if (!(fkt = thread->lpStartAddress))
#  529|   	{
#  530|-> 		WLog_ERR(TAG, "Thread function argument is %p", (void*)fkt);
#  531|   		goto exit;
#  532|   	}

Error: GCC_ANALYZER_WARNING (CWE-416): [#def62]
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/libwinpr/utils/collections/CountdownEvent.c: scope_hint: In function ‘CountdownEvent_Free’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/libwinpr/utils/collections/CountdownEvent.c:207:9: warning[-Wanalyzer-use-after-free]: use after ‘CountdownEvent_Free’ of ‘countdown’
#  205|   
#  206|   	DeleteCriticalSection(&countdown->lock);
#  207|-> 	CloseHandle(countdown->event);
#  208|   
#  209|   	free(countdown);

Error: COMPILER_WARNING: [#def63]
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/libwinpr/wtsapi/wtsapi.c: scope_hint: In function ‘LoadAndInitialize’
freerdp-3.8.0-build/FreeRDP-3.8.0/winpr/libwinpr/wtsapi/wtsapi.c:704:23: warning[-Wpedantic]: ISO C forbids conversion of object pointer to function pointer type
#  704 |         pInitWtsApi = (INIT_WTSAPI_FN)GetProcAddress(g_WtsApiModule, "InitWtsApi");
#      |                       ^
#  702|   		return FALSE;
#  703|   
#  704|-> 	pInitWtsApi = (INIT_WTSAPI_FN)GetProcAddress(g_WtsApiModule, "InitWtsApi");
#  705|   
#  706|   	if (!pInitWtsApi)

Scan Properties

analyzer-version-clippy1.82.0
analyzer-version-cppcheck2.16.0
analyzer-version-gcc14.2.1
analyzer-version-gcc-analyzer15.0.0
analyzer-version-shellcheck0.10.0
analyzer-version-unicontrol0.0.2
diffbase-analyzer-version-clippy1.82.0
diffbase-analyzer-version-cppcheck2.16.0
diffbase-analyzer-version-gcc14.2.1
diffbase-analyzer-version-gcc-analyzer15.0.0
diffbase-analyzer-version-shellcheck0.10.0
diffbase-analyzer-version-unicontrol0.0.2
diffbase-enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
diffbase-exit-code0
diffbase-hostip-172-16-1-240.us-west-2.compute.internal
diffbase-mock-configfedora-rawhide-gcc-latest-x86_64
diffbase-project-namefreerdp-3.9.0-1.fc42
diffbase-store-results-to/tmp/tmpsk0gh83m/freerdp-3.9.0-1.fc42.tar.xz
diffbase-time-created2024-11-13 00:06:41
diffbase-time-finished2024-11-13 00:16:14
diffbase-toolcsmock
diffbase-tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-gcc-latest-x86_64' '-t' 'clippy,cppcheck,gcc,unicontrol,shellcheck' '-o' '/tmp/tmpsk0gh83m/freerdp-3.9.0-1.fc42.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install=gcc-latest' '--gcc-analyzer-bin=/opt/gcc-latest/bin/gcc' '/tmp/tmpsk0gh83m/freerdp-3.9.0-1.fc42.src.rpm'
diffbase-tool-versioncsmock-3.7.1.20241107.094801.gb3f0f26.pr_192-1.el9
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-240.us-west-2.compute.internal
mock-configfedora-rawhide-gcc-latest-x86_64
project-namefreerdp-3.8.0-1.fc41
store-results-to/tmp/tmptd7qbj7s/freerdp-3.8.0-1.fc41.tar.xz
time-created2024-11-12 23:56:24
time-finished2024-11-13 00:06:16
titleFixed findings
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-gcc-latest-x86_64' '-t' 'clippy,cppcheck,gcc,unicontrol,shellcheck' '-o' '/tmp/tmptd7qbj7s/freerdp-3.8.0-1.fc41.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install=gcc-latest' '--gcc-analyzer-bin=/opt/gcc-latest/bin/gcc' '/tmp/tmptd7qbj7s/freerdp-3.8.0-1.fc41.src.rpm'
tool-versioncsmock-3.7.1.20241107.094801.gb3f0f26.pr_192-1.el9