[*printf] cast return to void

This commit is contained in:
akallabeth 2024-09-30 18:04:37 +02:00
parent 95bafbf8d4
commit 485ebe03bf
No known key found for this signature in database
GPG Key ID: A49454A3FC909FD5
3 changed files with 15 additions and 12 deletions

View File

@ -155,7 +155,7 @@ static int cam_v4l_open_device(const char* deviceId, int flags)
for (UINT n = 0; n < 64; n++)
{
snprintf(device, sizeof(device), "/dev/video%d", n);
(void)_snprintf(device, sizeof(device), "/dev/video%d", n);
if ((fd = open(device, flags)) == -1)
continue;
@ -287,7 +287,7 @@ static UINT cam_v4l_enumerate(ICamHal* ihal, ICamHalEnumCallback callback, Camer
{
char device[20] = { 0 };
struct v4l2_capability cap = { 0 };
snprintf(device, sizeof(device), "/dev/video%d", n);
(void)_snprintf(device, sizeof(device), "/dev/video%d", n);
int fd = open(device, O_RDONLY);
if (fd == -1)
continue;

View File

@ -2375,23 +2375,27 @@ BOOL freerdp_client_populate_settings_from_rdp_file(const rdpFile* file, rdpSett
if (!args)
return FALSE;
BOOL status = TRUE;
if (~file->EncodeRedirectedVideoCapture)
{
char encode[64];
_snprintf(encode, sizeof(encode), "encode:%" PRIu32,
file->EncodeRedirectedVideoCapture);
freerdp_addin_argv_add_argument(args, encode);
char encode[64] = { 0 };
(void)_snprintf(encode, sizeof(encode), "encode:%" PRIu32,
file->EncodeRedirectedVideoCapture);
if (!freerdp_addin_argv_add_argument(args, encode))
status = FALSE;
}
if (~file->RedirectedVideoCaptureEncodingQuality)
{
char quality[64];
_snprintf(quality, sizeof(quality), "quality:%" PRIu32,
file->RedirectedVideoCaptureEncodingQuality);
freerdp_addin_argv_add_argument(args, quality);
char quality[64] = { 0 };
(void)_snprintf(quality, sizeof(quality), "quality:%" PRIu32,
file->RedirectedVideoCaptureEncodingQuality);
if (!freerdp_addin_argv_add_argument(args, quality))
status = FALSE;
}
cnv.c = args->argv;
const BOOL status = freerdp_client_add_dynamic_channel(settings, args->argc, cnv.cc);
if (status)
status = freerdp_client_add_dynamic_channel(settings, args->argc, cnv.cc);
freerdp_addin_argv_free(args);
if (!status)
return FALSE;

View File

@ -51,7 +51,6 @@ static const char* strsignal(int signum)
static void cleanup_handler(int signum)
{
(void)printf("\n");
WLog_INFO(TAG, "caught signal %s [%d], starting cleanup...", strsignal(signum), signum);
WLog_INFO(TAG, "stopping all connections.");