[build] fix unused compiler warnings

This commit is contained in:
akallabeth 2023-06-26 11:08:21 +02:00 committed by Martin Fleisz
parent 3554dd1c64
commit 3f78b3c379
5 changed files with 4 additions and 9 deletions

View File

@ -1696,7 +1696,6 @@ static UINT rdpdr_server_receive_prn_cache_add_printer(RdpdrServerContext* conte
const WCHAR* PnPName;
const WCHAR* DriverName;
const WCHAR* PrinterName;
const BYTE* config;
WINPR_ASSERT(context);
WINPR_ASSERT(context->priv);
@ -1720,7 +1719,6 @@ static UINT rdpdr_server_receive_prn_cache_add_printer(RdpdrServerContext* conte
if (!PrinterName && (PrinterNameLen > 0))
return ERROR_INVALID_DATA;
config = Stream_ConstPointer(s);
if (!Stream_CheckAndLogRequiredLengthWLog(context->priv->log, s, CachedFieldsLen))
return ERROR_INVALID_DATA;
Stream_Seek(s, CachedFieldsLen);

View File

@ -1556,13 +1556,8 @@ static void cliprdr_local_file_try_close(CliprdrLocalFile* file, UINT res, UINT6
static UINT cliprdr_file_context_server_file_size_request(
CliprdrFileContext* file, const CLIPRDR_FILE_CONTENTS_REQUEST* fileContentsRequest)
{
wClipboardFileSizeRequest request = { 0 };
WINPR_ASSERT(fileContentsRequest);
request.streamId = fileContentsRequest->streamId;
request.listIndex = fileContentsRequest->listIndex;
if (fileContentsRequest->cbRequested != sizeof(UINT64))
{
WLog_Print(file->log, WLOG_WARN, "unexpected FILECONTENTS_SIZE request: %" PRIu32 " bytes",

View File

@ -92,7 +92,7 @@ static BOOL freerdp_client_print_codepages(const char* arg)
for (size_t x = 0; x < count; x++)
{
const RDP_CODEPAGE* page = &pages[x];
char buffer[80] = { 0 };
char buffer[520] = { 0 };
if (strnlen(page->subLanguageSymbol, ARRAYSIZE(page->subLanguageSymbol)) > 0)
_snprintf(buffer, sizeof(buffer), "[%s|%s]", page->primaryLanguageSymbol,

View File

@ -2102,6 +2102,8 @@ BOOL license_read_new_or_upgrade_license_packet(rdpLicense* license, wStream* s)
Stream_Read_UINT16(licenseStream, os_minor);
Stream_Read_UINT16(licenseStream, os_major);
WLog_DBG(TAG, "Version: %" PRIu16 ".%" PRIu16, os_major, os_minor);
/* Scope */
Stream_Read_UINT32(licenseStream, cbScope);
if (!license_check_stream_length(licenseStream, cbScope, "license new/upgrade::blob::scope"))

View File

@ -16,7 +16,7 @@ static BOOL TestStream_Verify(wStream* s, size_t mincap, size_t len, size_t pos)
return FALSE;
}
if (Stream_PointerAs(s, BYTE*) < Stream_Buffer(s))
if (Stream_Pointer(s) < Stream_Buffer(s))
{
printf("stream pointer (%p) or buffer (%p) is invalid\n", Stream_ConstPointer(s),
(void*)Stream_Buffer(s));