mirror of https://github.com/FreeRDP/FreeRDP
[warnings] fix various warnings
* missing const in casts * missing static for functions * missing WINPR_ATTR_FORMAT_ARG for printf like functions
This commit is contained in:
parent
9f7cfe51ba
commit
07543a6042
|
@ -103,7 +103,7 @@ out_error:
|
|||
return NULL;
|
||||
}
|
||||
|
||||
static MSUSB_INTERFACE_DESCRIPTOR* msusb_msinterface_new()
|
||||
static MSUSB_INTERFACE_DESCRIPTOR* msusb_msinterface_new(void)
|
||||
{
|
||||
return (MSUSB_INTERFACE_DESCRIPTOR*)calloc(1, sizeof(MSUSB_INTERFACE_DESCRIPTOR));
|
||||
}
|
||||
|
|
|
@ -140,8 +140,8 @@ static BOOL nsc_encode_argb_to_aycocg(NSC_CONTEXT* context, const BYTE* data, UI
|
|||
coplane = context->priv->PlaneBuffers[1] + y * rw;
|
||||
cgplane = context->priv->PlaneBuffers[2] + y * rw;
|
||||
aplane = context->priv->PlaneBuffers[3] + y * context->width;
|
||||
src_32 = (UINT32*)src;
|
||||
src_16 = (UINT16*)src;
|
||||
src_32 = (const UINT32*)src;
|
||||
src_16 = (const UINT16*)src;
|
||||
|
||||
for (x = 0; x < context->width; x++)
|
||||
{
|
||||
|
|
|
@ -57,8 +57,8 @@ static void rfx_encode_format_rgb(const BYTE* rgb_data, int width, int height, i
|
|||
for (y = 0; y < height; y++)
|
||||
{
|
||||
src = rgb_data + y * rowstride;
|
||||
src_32 = (UINT32*)src;
|
||||
src_16 = (UINT16*)src;
|
||||
src_32 = (const UINT32*)src;
|
||||
src_16 = (const UINT16*)src;
|
||||
|
||||
switch (pixel_format)
|
||||
{
|
||||
|
|
|
@ -137,13 +137,13 @@ static long transport_bio_named_ctrl(BIO* bio, int cmd, long arg1, void* arg2)
|
|||
int timeout = (int)arg1;
|
||||
return 1;
|
||||
}
|
||||
break;
|
||||
|
||||
case BIO_C_WAIT_WRITE:
|
||||
{
|
||||
int timeout = (int)arg1;
|
||||
return 1;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -224,7 +224,7 @@ static int transport_bio_named_free(BIO* bio)
|
|||
return 1;
|
||||
}
|
||||
|
||||
BIO_METHOD* BIO_s_namedpipe(void)
|
||||
static BIO_METHOD* BIO_s_namedpipe(void)
|
||||
{
|
||||
static BIO_METHOD* bio_methods = NULL;
|
||||
|
||||
|
@ -246,7 +246,7 @@ BIO_METHOD* BIO_s_namedpipe(void)
|
|||
}
|
||||
|
||||
typedef NTSTATUS (*WinStationCreateChildSessionTransportFn)(WCHAR* path, DWORD len);
|
||||
BOOL createChildSessionTransport(HANDLE* pFile)
|
||||
static BOOL createChildSessionTransport(HANDLE* pFile)
|
||||
{
|
||||
WINPR_ASSERT(pFile);
|
||||
|
||||
|
|
|
@ -451,8 +451,8 @@ static BOOL arm_stringEncodeW(const BYTE* pin, size_t cbIn, BYTE** ppOut, size_t
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
BOOL arm_encodeRedirectPasswd(rdpSettings* settings, const rdpCertificate* cert,
|
||||
WINPR_CIPHER_CTX* cipher)
|
||||
static BOOL arm_encodeRedirectPasswd(rdpSettings* settings, const rdpCertificate* cert,
|
||||
WINPR_CIPHER_CTX* cipher)
|
||||
{
|
||||
BOOL ret = FALSE;
|
||||
BYTE* output = NULL;
|
||||
|
|
|
@ -70,7 +70,7 @@ struct format_option_recurse
|
|||
/**
|
||||
* Log Layout
|
||||
*/
|
||||
|
||||
WINPR_ATTR_FORMAT_ARG(3, 0)
|
||||
static void WLog_PrintMessagePrefixVA(wLog* log, wLogMessage* message, const char* format,
|
||||
va_list args)
|
||||
{
|
||||
|
@ -78,6 +78,7 @@ static void WLog_PrintMessagePrefixVA(wLog* log, wLogMessage* message, const cha
|
|||
vsnprintf(message->PrefixString, WLOG_MAX_PREFIX_SIZE - 1, format, args);
|
||||
}
|
||||
|
||||
WINPR_ATTR_FORMAT_ARG(3, 4)
|
||||
static void WLog_PrintMessagePrefix(wLog* log, wLogMessage* message, const char* format, ...)
|
||||
{
|
||||
va_list args;
|
||||
|
|
Loading…
Reference in New Issue