[warnings] fix various minor warnings

This commit is contained in:
akallabeth 2024-05-07 23:41:00 +02:00 committed by akallabeth
parent a403b3bd1c
commit 1b8221e5bf
3 changed files with 17 additions and 22 deletions

View File

@ -63,16 +63,15 @@ typedef struct
rdpContext* rdpcontext;
} AudinOSSDevice;
#define OSS_LOG_ERR(_text, _error) \
do \
{ \
if ((_error) != 0) \
{ \
char buffer[256] = { 0 }; \
WLog_ERR(TAG, "%s: %i - %s\n", (_text), (_error), \
winpr_strerror((_error), buffer, sizeof(buffer))); \
} \
} while (0)
static void OSS_LOG_ERR(const char* _text, int _error)
{
if ((_error) != 0)
{
char buffer[256] = { 0 };
WLog_ERR(TAG, "%s: %i - %s\n", (_text), (_error),
winpr_strerror((_error), buffer, sizeof(buffer)));
}
}
static UINT32 audin_oss_get_format(const AUDIO_FORMAT* format)
{

View File

@ -197,8 +197,6 @@ static INLINE krb5glue_key get_key(struct krb5glue_keyset* keyset)
: keyset->session_key;
}
#endif /* WITH_KRB5 */
static BOOL isValidIPv4(const char* ipAddress)
{
struct sockaddr_in sa = { 0 };
@ -218,6 +216,8 @@ static BOOL isValidIP(const char* ipAddress)
return isValidIPv4(ipAddress) || isValidIPv6(ipAddress);
}
#endif /* WITH_KRB5 */
static SECURITY_STATUS SEC_ENTRY kerberos_AcquireCredentialsHandleA(
SEC_CHAR* pszPrincipal, SEC_CHAR* pszPackage, ULONG fCredentialUse, void* pvLogonID,
void* pAuthData, SEC_GET_KEY_FN pGetKeyFn, void* pvGetKeyArgument, PCredHandle phCredential,

View File

@ -579,7 +579,7 @@ void winpr_image_free(wImage* image, BOOL bFreeBuffer)
free(image);
}
void* winpr_convert_to_jpeg(const void* data, size_t size, UINT32 width, UINT32 height,
static void* winpr_convert_to_jpeg(const void* data, size_t size, UINT32 width, UINT32 height,
UINT32 stride, UINT32 bpp, UINT32* pSize)
{
WINPR_ASSERT(data || (size == 0));
@ -695,7 +695,7 @@ fail:
#endif
}
void* winpr_convert_to_webp(const void* data, size_t size, UINT32 width, UINT32 height,
static void* winpr_convert_to_webp(const void* data, size_t size, UINT32 width, UINT32 height,
UINT32 stride, UINT32 bpp, UINT32* pSize)
{
WINPR_ASSERT(data || (size == 0));
@ -968,7 +968,7 @@ fail:
}
#endif
void* winpr_convert_to_png(const void* data, size_t size, UINT32 width, UINT32 height,
static void* winpr_convert_to_png(const void* data, size_t size, UINT32 width, UINT32 height,
UINT32 stride, UINT32 bpp, UINT32* pSize)
{
WINPR_ASSERT(data || (size == 0));
@ -1224,7 +1224,6 @@ void* winpr_image_write_buffer(wImage* image, UINT32 format, size_t* psize)
*psize = outsize;
return data;
}
break;
case WINPR_IMAGE_WEBP:
{
UINT32 outsize = 0;
@ -1234,7 +1233,6 @@ void* winpr_image_write_buffer(wImage* image, UINT32 format, size_t* psize)
*psize = outsize;
return data;
}
break;
case WINPR_IMAGE_JPEG:
{
UINT32 outsize = 0;
@ -1244,7 +1242,6 @@ void* winpr_image_write_buffer(wImage* image, UINT32 format, size_t* psize)
*psize = outsize;
return data;
}
break;
case WINPR_IMAGE_PNG:
{
UINT32 outsize = 0;
@ -1254,7 +1251,6 @@ void* winpr_image_write_buffer(wImage* image, UINT32 format, size_t* psize)
*psize = outsize;
return data;
}
break;
default:
*psize = 0;
return NULL;