mirror of
https://github.com/morgan9e/FreeRDP
synced 2026-04-14 00:14:11 +09:00
[warnings] fixed clang build warnings
This commit is contained in:
@@ -168,7 +168,7 @@ static void terminate_plugin_cb(GENERIC_DYNVC_PLUGIN* base)
|
||||
|
||||
static const IWTSVirtualChannelCallback ainput_functions = { ainput_on_data_received,
|
||||
NULL, /* Open */
|
||||
ainput_on_close };
|
||||
ainput_on_close, NULL };
|
||||
|
||||
/**
|
||||
* Function description
|
||||
|
||||
@@ -308,7 +308,7 @@ static void disp_plugin_terminated(GENERIC_DYNVC_PLUGIN* base)
|
||||
}
|
||||
|
||||
static const IWTSVirtualChannelCallback disp_callbacks = { disp_on_data_received, NULL, /* Open */
|
||||
disp_on_close };
|
||||
disp_on_close, NULL };
|
||||
|
||||
/**
|
||||
* Function description
|
||||
|
||||
@@ -77,7 +77,7 @@ static UINT echo_on_close(IWTSVirtualChannelCallback* pChannelCallback)
|
||||
}
|
||||
|
||||
static const IWTSVirtualChannelCallback echo_callbacks = { echo_on_data_received, NULL, /* Open */
|
||||
echo_on_close };
|
||||
echo_on_close, NULL };
|
||||
|
||||
/**
|
||||
* Function description
|
||||
|
||||
@@ -329,7 +329,7 @@ static void mappedGeometryUnref_void(void* arg)
|
||||
|
||||
static const IWTSVirtualChannelCallback geometry_callbacks = { geometry_on_data_received,
|
||||
NULL, /* Open */
|
||||
geometry_on_close };
|
||||
geometry_on_close, NULL };
|
||||
|
||||
static UINT init_plugin_cb(GENERIC_DYNVC_PLUGIN* base, rdpContext* rcontext, rdpSettings* settings)
|
||||
{
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
#include <freerdp/channels/log.h>
|
||||
#define TAG CHANNELS_TAG("printer.client.cups")
|
||||
|
||||
#if __APPLE__
|
||||
#if defined(__APPLE__)
|
||||
#include <errno.h>
|
||||
#include <sys/sysctl.h>
|
||||
|
||||
@@ -308,7 +308,7 @@ static rdpPrinter* printer_cups_new_printer(rdpCupsPrinterDriver* cups_driver, c
|
||||
else
|
||||
{
|
||||
const char* dname = "MS Publisher Imagesetter";
|
||||
#if __APPLE__
|
||||
#if defined(__APPLE__)
|
||||
if (is_mac_os_sonoma_or_later())
|
||||
dname = "Microsoft Print to PDF";
|
||||
#endif
|
||||
@@ -352,7 +352,7 @@ static void printer_cups_release_enum_printers(rdpPrinter** printers)
|
||||
|
||||
static rdpPrinter** printer_cups_enum_printers(rdpPrinterDriver* driver)
|
||||
{
|
||||
rdpPrinter** printers;
|
||||
rdpPrinter** printers = NULL;
|
||||
int num_printers = 0;
|
||||
cups_dest_t* dests = NULL;
|
||||
cups_dest_t* dest = NULL;
|
||||
|
||||
@@ -1460,7 +1460,7 @@ static void terminate_plugin_cb(GENERIC_DYNVC_PLUGIN* base)
|
||||
|
||||
static const IWTSVirtualChannelCallback geometry_callbacks = { rdpei_on_data_received,
|
||||
NULL, /* Open */
|
||||
rdpei_on_close };
|
||||
rdpei_on_close, NULL };
|
||||
|
||||
/**
|
||||
* Function description
|
||||
|
||||
@@ -2405,7 +2405,8 @@ void rdpgfx_client_context_free(RdpgfxClientContext* context)
|
||||
}
|
||||
|
||||
static const IWTSVirtualChannelCallback rdpgfx_callbacks = { rdpgfx_on_data_received,
|
||||
rdpgfx_on_open, rdpgfx_on_close };
|
||||
rdpgfx_on_open, rdpgfx_on_close,
|
||||
NULL };
|
||||
|
||||
/**
|
||||
* Function description
|
||||
|
||||
@@ -2177,12 +2177,14 @@ int ncrush_decompress(NCRUSH_CONTEXT* ncrush, const BYTE* pSrcData, UINT32 SrcSi
|
||||
if (idx >= ARRAYSIZE(HuffTableMask))
|
||||
return -1;
|
||||
|
||||
const UINT16 Mask = get_word(&HuffTableMask[idx]);
|
||||
const UINT32 MaskedBits = bits & Mask;
|
||||
const UINT32 tmp = CopyOffsetBase + MaskedBits;
|
||||
if (tmp < 1)
|
||||
return -1;
|
||||
CopyOffset = tmp - 1;
|
||||
{
|
||||
const UINT16 Mask = get_word(&HuffTableMask[idx]);
|
||||
const UINT32 MaskedBits = bits & Mask;
|
||||
const UINT32 tmp = CopyOffsetBase + MaskedBits;
|
||||
if (tmp < 1)
|
||||
return -1;
|
||||
CopyOffset = tmp - 1;
|
||||
}
|
||||
bits >>= CopyOffsetBits;
|
||||
nbits -= CopyOffsetBits;
|
||||
|
||||
|
||||
@@ -134,13 +134,11 @@ static long transport_bio_named_ctrl(BIO* bio, int cmd, long arg1, void* arg2)
|
||||
}
|
||||
case BIO_C_WAIT_READ:
|
||||
{
|
||||
int timeout = (int)arg1;
|
||||
return 1;
|
||||
}
|
||||
|
||||
case BIO_C_WAIT_WRITE:
|
||||
{
|
||||
int timeout = (int)arg1;
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
@@ -80,7 +80,6 @@ static BOOL rdp_read_info_null_string(rdpSettings* settings, FreeRDP_Settings_Ke
|
||||
size_t max)
|
||||
{
|
||||
const BOOL unicode = (flags & INFO_UNICODE) ? TRUE : FALSE;
|
||||
const size_t nullSize = unicode ? sizeof(WCHAR) : sizeof(CHAR);
|
||||
|
||||
if (!freerdp_settings_set_string(settings, id, NULL))
|
||||
return FALSE;
|
||||
|
||||
Reference in New Issue
Block a user