[warnings] fix unused variables

This commit is contained in:
akallabeth 2024-09-12 10:41:40 +02:00
parent 29697ca68d
commit adc4f2abf8
No known key found for this signature in database
GPG Key ID: A49454A3FC909FD5
4 changed files with 13 additions and 6 deletions

View File

@ -118,6 +118,9 @@ static char* gdi_convert_postfix_to_infix(const char* postfix)
} }
else else
{ {
char* a = NULL;
char* b = NULL;
/* token is an operator */ /* token is an operator */
unary = FALSE; unary = FALSE;
char* c = malloc(2); char* c = malloc(2);
@ -149,11 +152,10 @@ static char* gdi_convert_postfix_to_infix(const char* postfix)
} }
// printf("Operator: %s\n", c); // printf("Operator: %s\n", c);
char* a = (char*)Stack_Pop(stack); a = (char*)Stack_Pop(stack);
if (!a) if (!a)
goto fail; goto fail;
char* b = NULL;
if (!unary) if (!unary)
b = (char*)Stack_Pop(stack); b = (char*)Stack_Pop(stack);

View File

@ -513,7 +513,8 @@ static BOOL shadow_client_post_connect(freerdp_peer* peer)
BOOL rc = freerdp_settings_set_bool( BOOL rc = freerdp_settings_set_bool(
settings, FreeRDP_NSCodec, settings, FreeRDP_NSCodec,
FALSE); /* NSCodec compressor does not support fragmentation yet */ FALSE); /* NSCodec compressor does not support fragmentation yet */
WINPR_ASSERT(rc); if (!rc)
return FALSE;
} }
WLog_INFO(TAG, "Client from %s is activated (%" PRIu32 "x%" PRIu32 "@%" PRIu32 ")", WLog_INFO(TAG, "Client from %s is activated (%" PRIu32 "x%" PRIu32 "@%" PRIu32 ")",

View File

@ -207,7 +207,11 @@ int winpr_vasprintf(char** s, size_t* slen, WINPR_FORMAT_ARG const char* templ,
const int plen = vsprintf(str, templ, ap); const int plen = vsprintf(str, templ, ap);
va_end(ap); va_end(ap);
WINPR_ASSERT(length == plen); if (length != plen)
{
free(str);
return -1;
}
*s = str; *s = str;
*slen = (size_t)length; *slen = (size_t)length;
return length; return length;

View File

@ -243,8 +243,8 @@ static void StreamPool_Remove(wStreamPool* pool, wStream* s)
for (size_t x = 0; x < pool->aSize; x++) for (size_t x = 0; x < pool->aSize; x++)
{ {
wStream* cs = pool->aArray[x]; wStream* cs = pool->aArray[x];
if (cs == s)
WINPR_ASSERT(cs != s); return;
} }
pool->aArray[(pool->aSize)++] = s; pool->aArray[(pool->aSize)++] = s;
StreamPool_RemoveUsed(pool, s); StreamPool_RemoveUsed(pool, s);