[warnings] fix cert-err33-c

Fix unused return values, cast to void if on purpose
This commit is contained in:
akallabeth
2024-08-26 15:39:33 +02:00
parent 7503efed27
commit 1d33095500
172 changed files with 1146 additions and 1080 deletions

View File

@@ -51,7 +51,7 @@ static const char* strsignal(int signum)
static void cleanup_handler(int signum)
{
printf("\n");
(void)printf("\n");
WLog_INFO(TAG, "caught signal %s [%d], starting cleanup...", strsignal(signum), signum);
WLog_INFO(TAG, "stopping all connections.");
@@ -60,11 +60,11 @@ static void cleanup_handler(int signum)
static void pf_server_register_signal_handlers(void)
{
signal(SIGINT, cleanup_handler);
signal(SIGTERM, cleanup_handler);
(void)signal(SIGINT, cleanup_handler);
(void)signal(SIGTERM, cleanup_handler);
#ifndef _WIN32
signal(SIGQUIT, cleanup_handler);
signal(SIGKILL, cleanup_handler);
(void)signal(SIGQUIT, cleanup_handler);
(void)signal(SIGKILL, cleanup_handler);
#endif
}

View File

@@ -95,7 +95,7 @@ class ChannelData
: _base(base), _channels_to_dump(list), _session_id(sessionid)
{
char str[64] = {};
_snprintf(str, sizeof(str), "session-%016" PRIx64, _session_id);
(void)_snprintf(str, sizeof(str), "session-%016" PRIx64, _session_id);
_base /= str;
}
@@ -176,7 +176,7 @@ class ChannelData
{
auto name = idstr(channel, back);
char cstr[32] = {};
_snprintf(cstr, sizeof(cstr), "%016" PRIx64 "-", count);
(void)_snprintf(cstr, sizeof(cstr), "%016" PRIx64 "-", count);
auto path = _base / cstr;
path += name;
path += ".dump";

View File

@@ -597,8 +597,8 @@ proxyModule* pf_modules_new(const char* root_dir, const char** modules, size_t c
{
char name[8192] = { 0 };
char* fullpath = NULL;
_snprintf(name, sizeof(name), "proxy-%s-plugin%s", modules[i],
FREERDP_SHARED_LIBRARY_SUFFIX);
(void)_snprintf(name, sizeof(name), "proxy-%s-plugin%s", modules[i],
FREERDP_SHARED_LIBRARY_SUFFIX);
fullpath = GetCombinedPath(path, name);
pf_modules_load_module(fullpath, module, NULL);
free(fullpath);