[clang-tidy] readability-isolate-declaration
This commit is contained in:
parent
735dc61cd9
commit
207def5c56
@ -191,8 +191,10 @@ static UINT ainput_server_send_version(ainput_server* ainput)
|
||||
static UINT ainput_server_recv_mouse_event(ainput_server* ainput, wStream* s)
|
||||
{
|
||||
UINT error = CHANNEL_RC_OK;
|
||||
UINT64 flags, time;
|
||||
INT32 x, y;
|
||||
UINT64 flags;
|
||||
UINT64 time;
|
||||
INT32 x;
|
||||
INT32 y;
|
||||
char buffer[128] = { 0 };
|
||||
|
||||
WINPR_ASSERT(ainput);
|
||||
@ -437,7 +439,8 @@ static UINT ainput_process_message(ainput_server* ainput)
|
||||
{
|
||||
BOOL rc;
|
||||
UINT error = ERROR_INTERNAL_ERROR;
|
||||
ULONG BytesReturned, ActualBytesReturned;
|
||||
ULONG BytesReturned;
|
||||
ULONG ActualBytesReturned;
|
||||
UINT16 MessageId;
|
||||
wStream* s;
|
||||
|
||||
|
@ -148,7 +148,8 @@ static DWORD WINAPI audin_oss_thread_func(LPVOID arg)
|
||||
{
|
||||
char dev_name[PATH_MAX] = "/dev/dsp";
|
||||
char mixer_name[PATH_MAX] = "/dev/mixer";
|
||||
int pcm_handle = -1, mixer_handle;
|
||||
int pcm_handle = -1;
|
||||
int mixer_handle;
|
||||
BYTE* buffer = NULL;
|
||||
unsigned long tmp = 0;
|
||||
size_t buffer_size = 0;
|
||||
@ -385,7 +386,8 @@ static UINT audin_oss_free(IAudinDevice* device)
|
||||
static UINT audin_oss_parse_addin_args(AudinOSSDevice* device, const ADDIN_ARGV* args)
|
||||
{
|
||||
int status;
|
||||
char *str_num, *eptr;
|
||||
char* str_num;
|
||||
char* eptr;
|
||||
DWORD flags;
|
||||
const COMMAND_LINE_ARGUMENT_A* arg;
|
||||
AudinOSSDevice* oss = (AudinOSSDevice*)device;
|
||||
|
@ -87,7 +87,8 @@ static FREERDP_ADDIN** freerdp_channels_list_client_static_addins(LPCSTR pszName
|
||||
LPCSTR pszSubsystem,
|
||||
LPCSTR pszType, DWORD dwFlags)
|
||||
{
|
||||
size_t i, j;
|
||||
size_t i;
|
||||
size_t j;
|
||||
DWORD nAddins;
|
||||
FREERDP_ADDIN** ppAddins = NULL;
|
||||
const STATIC_SUBSYSTEM_ENTRY* subsystems;
|
||||
|
@ -214,7 +214,8 @@ out:
|
||||
static UINT disp_server_receive_pdu(DispServerContext* context, wStream* s)
|
||||
{
|
||||
UINT error = CHANNEL_RC_OK;
|
||||
size_t beg, end;
|
||||
size_t beg;
|
||||
size_t end;
|
||||
DISPLAY_CONTROL_HEADER header = { 0 };
|
||||
|
||||
WINPR_ASSERT(s);
|
||||
|
@ -147,7 +147,9 @@ static UINT dvcman_register_plugin(IDRDYNVC_ENTRY_POINTS* pEntryPoints, const ch
|
||||
static IWTSPlugin* dvcman_get_plugin(IDRDYNVC_ENTRY_POINTS* pEntryPoints, const char* name)
|
||||
{
|
||||
IWTSPlugin* plugin = NULL;
|
||||
size_t i, nc, pc;
|
||||
size_t i;
|
||||
size_t nc;
|
||||
size_t pc;
|
||||
WINPR_ASSERT(pEntryPoints);
|
||||
DVCMAN* dvcman = ((DVCMAN_ENTRY_POINTS*)pEntryPoints)->dvcman;
|
||||
if (!dvcman || !pEntryPoints || !name)
|
||||
|
@ -886,7 +886,8 @@ static void drive_message_free(void* obj)
|
||||
static UINT drive_register_drive_path(PDEVICE_SERVICE_ENTRY_POINTS pEntryPoints, const char* name,
|
||||
const char* path, BOOL automount)
|
||||
{
|
||||
size_t i, length;
|
||||
size_t i;
|
||||
size_t length;
|
||||
DRIVE_DEVICE* drive;
|
||||
UINT error = ERROR_INTERNAL_ERROR;
|
||||
|
||||
|
@ -86,7 +86,8 @@ static UINT encomsp_recv_change_participant_control_level_pdu(EncomspServerConte
|
||||
wStream* s,
|
||||
ENCOMSP_ORDER_HEADER* header)
|
||||
{
|
||||
int beg, end;
|
||||
int beg;
|
||||
int end;
|
||||
ENCOMSP_CHANGE_PARTICIPANT_CONTROL_LEVEL_PDU pdu;
|
||||
UINT error = CHANNEL_RC_OK;
|
||||
beg = ((int)Stream_GetPosition(s)) - ENCOMSP_ORDER_HEADER_SIZE;
|
||||
|
@ -65,9 +65,14 @@ static void freerdp_rgndata_reset(FREERDP_RGNDATA* data)
|
||||
|
||||
static UINT32 geometry_read_RGNDATA(wLog* logger, wStream* s, UINT32 len, FREERDP_RGNDATA* rgndata)
|
||||
{
|
||||
UINT32 dwSize, iType;
|
||||
INT32 right, bottom;
|
||||
INT32 x, y, w, h;
|
||||
UINT32 dwSize;
|
||||
UINT32 iType;
|
||||
INT32 right;
|
||||
INT32 bottom;
|
||||
INT32 x;
|
||||
INT32 y;
|
||||
INT32 w;
|
||||
INT32 h;
|
||||
|
||||
if (len < 32)
|
||||
{
|
||||
@ -157,12 +162,14 @@ static UINT32 geometry_read_RGNDATA(wLog* logger, wStream* s, UINT32 len, FREERD
|
||||
*/
|
||||
static UINT geometry_recv_pdu(GENERIC_CHANNEL_CALLBACK* callback, wStream* s)
|
||||
{
|
||||
UINT32 length, cbGeometryBuffer;
|
||||
UINT32 length;
|
||||
UINT32 cbGeometryBuffer;
|
||||
MAPPED_GEOMETRY* mappedGeometry;
|
||||
GEOMETRY_PLUGIN* geometry;
|
||||
GeometryClientContext* context;
|
||||
UINT ret = CHANNEL_RC_OK;
|
||||
UINT32 updateType, geometryType;
|
||||
UINT32 updateType;
|
||||
UINT32 geometryType;
|
||||
UINT64 id;
|
||||
wLog* logger;
|
||||
|
||||
|
@ -156,7 +156,8 @@ static BOOL printer_config_valid(const char* path)
|
||||
|
||||
static BOOL printer_read_setting(const char* path, prn_conf_t type, void** data, UINT32* length)
|
||||
{
|
||||
DWORD lowSize, highSize;
|
||||
DWORD lowSize;
|
||||
DWORD highSize;
|
||||
DWORD read = 0;
|
||||
BOOL rc = FALSE;
|
||||
HANDLE file;
|
||||
@ -394,7 +395,8 @@ static BOOL printer_save_default_config(const rdpSettings* settings, rdpPrinter*
|
||||
BOOL res = FALSE;
|
||||
WCHAR* wname = NULL;
|
||||
WCHAR* driver = NULL;
|
||||
size_t wlen, dlen;
|
||||
size_t wlen;
|
||||
size_t dlen;
|
||||
char* path = NULL;
|
||||
|
||||
if (!settings || !printer || !printer->name || !printer->driver)
|
||||
@ -715,8 +717,13 @@ static UINT printer_custom_component(DEVICE* device, UINT16 component, UINT16 pa
|
||||
case RDPDR_ADD_PRINTER_EVENT:
|
||||
{
|
||||
char PortDosName[8];
|
||||
UINT32 PnPNameLen, DriverNameLen, PrintNameLen, CacheFieldsLen;
|
||||
const WCHAR *PnPName, *DriverName, *PrinterName;
|
||||
UINT32 PnPNameLen;
|
||||
UINT32 DriverNameLen;
|
||||
UINT32 PrintNameLen;
|
||||
UINT32 CacheFieldsLen;
|
||||
const WCHAR* PnPName;
|
||||
const WCHAR* DriverName;
|
||||
const WCHAR* PrinterName;
|
||||
const BYTE* CachedPrinterConfigData;
|
||||
|
||||
if (!Stream_CheckAndLogRequiredLength(TAG, s, 24))
|
||||
@ -762,7 +769,8 @@ static UINT printer_custom_component(DEVICE* device, UINT16 component, UINT16 pa
|
||||
|
||||
case RDPDR_UPDATE_PRINTER_EVENT:
|
||||
{
|
||||
UINT32 PrinterNameLen, ConfigDataLen;
|
||||
UINT32 PrinterNameLen;
|
||||
UINT32 ConfigDataLen;
|
||||
const WCHAR* PrinterName;
|
||||
const BYTE* ConfigData;
|
||||
|
||||
@ -811,7 +819,8 @@ static UINT printer_custom_component(DEVICE* device, UINT16 component, UINT16 pa
|
||||
|
||||
case RDPDR_RENAME_PRINTER_EVENT:
|
||||
{
|
||||
UINT32 OldPrinterNameLen, NewPrinterNameLen;
|
||||
UINT32 OldPrinterNameLen;
|
||||
UINT32 NewPrinterNameLen;
|
||||
const WCHAR* OldPrinterName;
|
||||
const WCHAR* NewPrinterName;
|
||||
|
||||
|
@ -416,7 +416,8 @@ static UINT rail_recv_compartmentinfo_order(railPlugin* rail, wStream* s)
|
||||
|
||||
BOOL rail_is_feature_supported(const rdpContext* context, UINT32 featureMask)
|
||||
{
|
||||
UINT32 supported, masked;
|
||||
UINT32 supported;
|
||||
UINT32 masked;
|
||||
|
||||
if (!context || !context->settings)
|
||||
return FALSE;
|
||||
|
@ -653,7 +653,9 @@ static UINT rail_read_client_status_order(wStream* s, RAIL_CLIENT_STATUS_ORDER*
|
||||
static UINT rail_read_exec_order(wStream* s, RAIL_EXEC_ORDER* exec)
|
||||
{
|
||||
RAIL_EXEC_ORDER order = { 0 };
|
||||
UINT16 exeLen, workLen, argLen;
|
||||
UINT16 exeLen;
|
||||
UINT16 workLen;
|
||||
UINT16 argLen;
|
||||
|
||||
if (!Stream_CheckAndLogRequiredLength(TAG, s, RAIL_EXEC_ORDER_LENGTH))
|
||||
return ERROR_INVALID_DATA;
|
||||
|
@ -1166,8 +1166,13 @@ static UINT rdpdr_server_receive_io_create_request(RdpdrServerContext* context,
|
||||
UINT32 CompletionId)
|
||||
{
|
||||
const WCHAR* path;
|
||||
UINT32 DesiredAccess, AllocationSize, FileAttributes, SharedAccess, CreateDisposition,
|
||||
CreateOptions, PathLength;
|
||||
UINT32 DesiredAccess;
|
||||
UINT32 AllocationSize;
|
||||
UINT32 FileAttributes;
|
||||
UINT32 SharedAccess;
|
||||
UINT32 CreateDisposition;
|
||||
UINT32 CreateOptions;
|
||||
UINT32 PathLength;
|
||||
|
||||
WINPR_ASSERT(context);
|
||||
if (!Stream_CheckAndLogRequiredLengthWLog(context->priv->log, s, 32))
|
||||
|
@ -170,7 +170,8 @@ static UINT rdpgfx_decode_AVC444(RDPGFX_PLUGIN* gfx, RDPGFX_SURFACE_COMMAND* cmd
|
||||
{
|
||||
UINT error = 0;
|
||||
UINT32 tmp = 0;
|
||||
size_t pos1 = 0, pos2 = 0;
|
||||
size_t pos1 = 0;
|
||||
size_t pos2 = 0;
|
||||
|
||||
RDPGFX_AVC444_BITMAP_STREAM h264 = { 0 };
|
||||
RdpgfxClientContext* context = gfx->context;
|
||||
|
@ -630,7 +630,8 @@ static UINT rdpgfx_recv_evict_cache_entry_pdu(GENERIC_CHANNEL_CALLBACK* callback
|
||||
*/
|
||||
static UINT rdpgfx_load_cache_import_offer(RDPGFX_PLUGIN* gfx, RDPGFX_CACHE_IMPORT_OFFER_PDU* offer)
|
||||
{
|
||||
int idx, count;
|
||||
int idx;
|
||||
int count;
|
||||
UINT error = CHANNEL_RC_OK;
|
||||
PERSISTENT_CACHE_ENTRY entry;
|
||||
rdpPersistentCache* persistent = NULL;
|
||||
@ -843,7 +844,8 @@ fail:
|
||||
*/
|
||||
static UINT rdpgfx_send_cache_offer(RDPGFX_PLUGIN* gfx)
|
||||
{
|
||||
int idx, count;
|
||||
int idx;
|
||||
int count;
|
||||
UINT error = CHANNEL_RC_OK;
|
||||
PERSISTENT_CACHE_ENTRY entry;
|
||||
RDPGFX_CACHE_IMPORT_OFFER_PDU* offer = NULL;
|
||||
|
@ -1390,7 +1390,8 @@ rdpgfx_send_map_surface_to_scaled_output_pdu(RdpgfxServerContext* context,
|
||||
*/
|
||||
static UINT rdpgfx_server_receive_pdu(RdpgfxServerContext* context, wStream* s)
|
||||
{
|
||||
size_t beg, end;
|
||||
size_t beg;
|
||||
size_t end;
|
||||
RDPGFX_HEADER header;
|
||||
UINT error = CHANNEL_RC_OK;
|
||||
beg = Stream_GetPosition(s);
|
||||
|
@ -451,7 +451,8 @@ static UINT rdpsnd_alsa_play(rdpsndDevicePlugin* device, const BYTE* data, size_
|
||||
}
|
||||
|
||||
{
|
||||
snd_pcm_sframes_t available, delay;
|
||||
snd_pcm_sframes_t available;
|
||||
snd_pcm_sframes_t delay;
|
||||
int rc = snd_pcm_avail_delay(alsa->pcm_handle, &available, &delay);
|
||||
|
||||
if (rc != 0)
|
||||
|
@ -300,7 +300,8 @@ static UINT32 rdpsnd_oss_get_volume(rdpsndDevicePlugin* device)
|
||||
{
|
||||
int vol;
|
||||
UINT32 dwVolume;
|
||||
UINT16 dwVolumeLeft, dwVolumeRight;
|
||||
UINT16 dwVolumeLeft;
|
||||
UINT16 dwVolumeRight;
|
||||
rdpsndOssPlugin* oss = (rdpsndOssPlugin*)device;
|
||||
/* On error return 50% volume. */
|
||||
dwVolumeLeft = ((50 * 0xFFFF) / 100); /* 50% */
|
||||
@ -324,7 +325,8 @@ static UINT32 rdpsnd_oss_get_volume(rdpsndDevicePlugin* device)
|
||||
|
||||
static BOOL rdpsnd_oss_set_volume(rdpsndDevicePlugin* device, UINT32 value)
|
||||
{
|
||||
int left, right;
|
||||
int left;
|
||||
int right;
|
||||
rdpsndOssPlugin* oss = (rdpsndOssPlugin*)device;
|
||||
|
||||
if (device == NULL || oss->mixer_handle == -1)
|
||||
@ -387,7 +389,8 @@ static UINT rdpsnd_oss_play(rdpsndDevicePlugin* device, const BYTE* data, size_t
|
||||
static int rdpsnd_oss_parse_addin_args(rdpsndDevicePlugin* device, const ADDIN_ARGV* args)
|
||||
{
|
||||
int status;
|
||||
char *str_num, *eptr;
|
||||
char* str_num;
|
||||
char* eptr;
|
||||
DWORD flags;
|
||||
const COMMAND_LINE_ARGUMENT_A* arg;
|
||||
rdpsndOssPlugin* oss = (rdpsndOssPlugin*)device;
|
||||
|
@ -601,7 +601,8 @@ static UINT rdpsnd_treat_wave(rdpsndPlugin* rdpsnd, wStream* s, size_t size)
|
||||
{
|
||||
AUDIO_FORMAT* format;
|
||||
UINT64 end;
|
||||
UINT64 diffMS, ts;
|
||||
UINT64 diffMS;
|
||||
UINT64 ts;
|
||||
UINT latency = 0;
|
||||
UINT error;
|
||||
|
||||
|
@ -177,7 +177,8 @@ static UINT rdpsnd_server_recv_quality_mode(RdpsndServerContext* context, wStrea
|
||||
*/
|
||||
static UINT rdpsnd_server_recv_formats(RdpsndServerContext* context, wStream* s)
|
||||
{
|
||||
UINT16 i, num_known_format = 0;
|
||||
UINT16 i;
|
||||
UINT16 num_known_format = 0;
|
||||
UINT16 udpPort;
|
||||
BYTE lastblock;
|
||||
UINT error = CHANNEL_RC_OK;
|
||||
@ -265,7 +266,8 @@ out_free:
|
||||
|
||||
static DWORD WINAPI rdpsnd_server_thread(LPVOID arg)
|
||||
{
|
||||
DWORD nCount = 0, status;
|
||||
DWORD nCount = 0;
|
||||
DWORD status;
|
||||
HANDLE events[2] = { 0 };
|
||||
RdpsndServerContext* context = (RdpsndServerContext*)arg;
|
||||
UINT error = CHANNEL_RC_OK;
|
||||
@ -492,7 +494,8 @@ static BOOL rdpsnd_server_align_wave_pdu(wStream* s, UINT32 alignment)
|
||||
static UINT rdpsnd_server_send_wave_pdu(RdpsndServerContext* context, UINT16 wTimestamp)
|
||||
{
|
||||
size_t length;
|
||||
size_t start, end = 0;
|
||||
size_t start;
|
||||
size_t end = 0;
|
||||
const BYTE* src;
|
||||
AUDIO_FORMAT* format;
|
||||
ULONG written;
|
||||
|
@ -820,7 +820,8 @@ FREERDP_ENTRY_POINT(UINT serial_DeviceServiceEntry(PDEVICE_SERVICE_ENTRY_POINTS
|
||||
char* driver;
|
||||
RDPDR_SERIAL* device;
|
||||
#if defined __linux__ && !defined ANDROID
|
||||
size_t i, len;
|
||||
size_t i;
|
||||
size_t len;
|
||||
SERIAL_DEVICE* serial;
|
||||
#endif /* __linux__ */
|
||||
UINT error = CHANNEL_RC_OK;
|
||||
|
@ -365,7 +365,8 @@ static UINT32 tsmf_codec_parse_VIDEOINFOHEADER(TS_AM_MEDIA_TYPE* mediatype, wStr
|
||||
|
||||
static BOOL tsmf_read_format_type(TS_AM_MEDIA_TYPE* mediatype, wStream* s, UINT32 cbFormat)
|
||||
{
|
||||
UINT32 i, j;
|
||||
UINT32 i;
|
||||
UINT32 j;
|
||||
|
||||
switch (mediatype->FormatType)
|
||||
{
|
||||
|
@ -328,8 +328,10 @@ static float tsmf_stream_read_float(wStream* s)
|
||||
UINT tsmf_ifman_set_source_video_rect(TSMF_IFMAN* ifman)
|
||||
{
|
||||
UINT status = CHANNEL_RC_OK;
|
||||
float Left, Top;
|
||||
float Right, Bottom;
|
||||
float Left;
|
||||
float Top;
|
||||
float Right;
|
||||
float Bottom;
|
||||
TSMF_PRESENTATION* presentation;
|
||||
DEBUG_TSMF("");
|
||||
|
||||
|
@ -318,8 +318,12 @@ static UINT urbdrc_process_internal_io_control(IUDEVICE* pdev, GENERIC_CHANNEL_C
|
||||
wStream* s, UINT32 MessageId, IUDEVMAN* udevman)
|
||||
{
|
||||
wStream* out;
|
||||
UINT32 IoControlCode, InterfaceId, InputBufferSize;
|
||||
UINT32 OutputBufferSize, RequestId, frames;
|
||||
UINT32 IoControlCode;
|
||||
UINT32 InterfaceId;
|
||||
UINT32 InputBufferSize;
|
||||
UINT32 OutputBufferSize;
|
||||
UINT32 RequestId;
|
||||
UINT32 frames;
|
||||
|
||||
if (!pdev || !callback || !s || !udevman)
|
||||
return ERROR_INVALID_PARAMETER;
|
||||
@ -397,7 +401,8 @@ static void func_select_all_interface_for_msconfig(IUDEVICE* pdev,
|
||||
{
|
||||
UINT32 inum;
|
||||
MSUSB_INTERFACE_DESCRIPTOR** MsInterfaces = MsConfig->MsInterfaces;
|
||||
BYTE InterfaceNumber, AlternateSetting;
|
||||
BYTE InterfaceNumber;
|
||||
BYTE AlternateSetting;
|
||||
UINT32 NumInterfaces = MsConfig->NumInterfaces;
|
||||
|
||||
for (inum = 0; inum < NumInterfaces; inum++)
|
||||
@ -414,7 +419,9 @@ static UINT urb_select_configuration(IUDEVICE* pdev, GENERIC_CHANNEL_CALLBACK* c
|
||||
{
|
||||
MSUSB_CONFIG_DESCRIPTOR* MsConfig = NULL;
|
||||
size_t out_size;
|
||||
UINT32 InterfaceId, NumInterfaces, usbd_status = 0;
|
||||
UINT32 InterfaceId;
|
||||
UINT32 NumInterfaces;
|
||||
UINT32 usbd_status = 0;
|
||||
BYTE ConfigurationDescriptorIsValid;
|
||||
wStream* out;
|
||||
int MsOutSize = 0;
|
||||
@ -531,7 +538,9 @@ static UINT urb_select_interface(IUDEVICE* pdev, GENERIC_CHANNEL_CALLBACK* callb
|
||||
{
|
||||
MSUSB_CONFIG_DESCRIPTOR* MsConfig;
|
||||
MSUSB_INTERFACE_DESCRIPTOR* MsInterface;
|
||||
UINT32 out_size, InterfaceId, ConfigurationHandle;
|
||||
UINT32 out_size;
|
||||
UINT32 InterfaceId;
|
||||
UINT32 ConfigurationHandle;
|
||||
UINT32 OutputBufferSize;
|
||||
BYTE InterfaceNumber;
|
||||
wStream* out;
|
||||
@ -618,10 +627,19 @@ static UINT urb_control_transfer(IUDEVICE* pdev, GENERIC_CHANNEL_CALLBACK* callb
|
||||
UINT32 RequestField, UINT32 MessageId, IUDEVMAN* udevman,
|
||||
int transferDir, int External)
|
||||
{
|
||||
UINT32 out_size, InterfaceId, EndpointAddress, PipeHandle;
|
||||
UINT32 TransferFlags, OutputBufferSize, usbd_status, Timeout;
|
||||
BYTE bmRequestType, Request;
|
||||
UINT16 Value, Index, length;
|
||||
UINT32 out_size;
|
||||
UINT32 InterfaceId;
|
||||
UINT32 EndpointAddress;
|
||||
UINT32 PipeHandle;
|
||||
UINT32 TransferFlags;
|
||||
UINT32 OutputBufferSize;
|
||||
UINT32 usbd_status;
|
||||
UINT32 Timeout;
|
||||
BYTE bmRequestType;
|
||||
BYTE Request;
|
||||
UINT16 Value;
|
||||
UINT16 Index;
|
||||
UINT16 length;
|
||||
BYTE* buffer;
|
||||
wStream* out;
|
||||
URBDRC_PLUGIN* urbdrc;
|
||||
@ -722,8 +740,10 @@ static UINT urb_bulk_or_interrupt_transfer(IUDEVICE* pdev, GENERIC_CHANNEL_CALLB
|
||||
wStream* s, UINT32 RequestField, UINT32 MessageId,
|
||||
IUDEVMAN* udevman, int transferDir)
|
||||
{
|
||||
UINT32 EndpointAddress, PipeHandle;
|
||||
UINT32 TransferFlags, OutputBufferSize;
|
||||
UINT32 EndpointAddress;
|
||||
UINT32 PipeHandle;
|
||||
UINT32 TransferFlags;
|
||||
UINT32 OutputBufferSize;
|
||||
const BOOL noAck = (RequestField & 0x80000000U) != 0;
|
||||
const UINT32 RequestId = RequestField & 0x7FFFFFFF;
|
||||
|
||||
@ -806,8 +826,12 @@ static UINT urb_isoch_transfer(IUDEVICE* pdev, GENERIC_CHANNEL_CALLBACK* callbac
|
||||
{
|
||||
int rc;
|
||||
UINT32 EndpointAddress;
|
||||
UINT32 PipeHandle, TransferFlags, StartFrame, NumberOfPackets;
|
||||
UINT32 ErrorCount, OutputBufferSize;
|
||||
UINT32 PipeHandle;
|
||||
UINT32 TransferFlags;
|
||||
UINT32 StartFrame;
|
||||
UINT32 NumberOfPackets;
|
||||
UINT32 ErrorCount;
|
||||
UINT32 OutputBufferSize;
|
||||
BYTE* packetDescriptorData;
|
||||
const BOOL noAck = (RequestField & 0x80000000U) != 0;
|
||||
const UINT32 RequestId = RequestField & 0x7FFFFFFF;
|
||||
@ -857,8 +881,12 @@ static UINT urb_control_descriptor_request(IUDEVICE* pdev, GENERIC_CHANNEL_CALLB
|
||||
IUDEVMAN* udevman, BYTE func_recipient, int transferDir)
|
||||
{
|
||||
size_t out_size;
|
||||
UINT32 InterfaceId, OutputBufferSize, usbd_status;
|
||||
BYTE bmRequestType, desc_index, desc_type;
|
||||
UINT32 InterfaceId;
|
||||
UINT32 OutputBufferSize;
|
||||
UINT32 usbd_status;
|
||||
BYTE bmRequestType;
|
||||
BYTE desc_index;
|
||||
BYTE desc_type;
|
||||
UINT16 langId;
|
||||
wStream* out;
|
||||
URBDRC_PLUGIN* urbdrc;
|
||||
@ -937,7 +965,9 @@ static UINT urb_control_get_status_request(IUDEVICE* pdev, GENERIC_CHANNEL_CALLB
|
||||
IUDEVMAN* udevman, BYTE func_recipient, int transferDir)
|
||||
{
|
||||
size_t out_size;
|
||||
UINT32 InterfaceId, OutputBufferSize, usbd_status;
|
||||
UINT32 InterfaceId;
|
||||
UINT32 OutputBufferSize;
|
||||
UINT32 usbd_status;
|
||||
UINT16 Index;
|
||||
BYTE bmRequestType;
|
||||
wStream* out;
|
||||
@ -996,10 +1026,17 @@ static UINT urb_control_vendor_or_class_request(IUDEVICE* pdev, GENERIC_CHANNEL_
|
||||
IUDEVMAN* udevman, BYTE func_type,
|
||||
BYTE func_recipient, int transferDir)
|
||||
{
|
||||
UINT32 out_size, InterfaceId, TransferFlags, usbd_status;
|
||||
UINT32 out_size;
|
||||
UINT32 InterfaceId;
|
||||
UINT32 TransferFlags;
|
||||
UINT32 usbd_status;
|
||||
UINT32 OutputBufferSize;
|
||||
BYTE ReqTypeReservedBits, Request, bmRequestType;
|
||||
UINT16 Value, Index, Padding;
|
||||
BYTE ReqTypeReservedBits;
|
||||
BYTE Request;
|
||||
BYTE bmRequestType;
|
||||
UINT16 Value;
|
||||
UINT16 Index;
|
||||
UINT16 Padding;
|
||||
wStream* out;
|
||||
URBDRC_PLUGIN* urbdrc;
|
||||
const BOOL noAck = (RequestField & 0x80000000U) != 0;
|
||||
@ -1079,8 +1116,12 @@ static UINT urb_os_feature_descriptor_request(IUDEVICE* pdev, GENERIC_CHANNEL_CA
|
||||
IUDEVMAN* udevman, int transferDir)
|
||||
{
|
||||
size_t out_size;
|
||||
UINT32 InterfaceId, OutputBufferSize, usbd_status;
|
||||
BYTE Recipient, InterfaceNumber, Ms_PageIndex;
|
||||
UINT32 InterfaceId;
|
||||
UINT32 OutputBufferSize;
|
||||
UINT32 usbd_status;
|
||||
BYTE Recipient;
|
||||
BYTE InterfaceNumber;
|
||||
BYTE Ms_PageIndex;
|
||||
UINT16 Ms_featureDescIndex;
|
||||
wStream* out;
|
||||
int ret;
|
||||
@ -1163,8 +1204,12 @@ static UINT urb_pipe_request(IUDEVICE* pdev, GENERIC_CHANNEL_CALLBACK* callback,
|
||||
UINT32 RequestField, UINT32 MessageId, IUDEVMAN* udevman,
|
||||
int transferDir, int action)
|
||||
{
|
||||
UINT32 out_size, InterfaceId, PipeHandle, EndpointAddress;
|
||||
UINT32 OutputBufferSize, usbd_status = 0;
|
||||
UINT32 out_size;
|
||||
UINT32 InterfaceId;
|
||||
UINT32 PipeHandle;
|
||||
UINT32 EndpointAddress;
|
||||
UINT32 OutputBufferSize;
|
||||
UINT32 usbd_status = 0;
|
||||
wStream* out;
|
||||
UINT32 ret = USBD_STATUS_REQUEST_FAILED;
|
||||
int rc;
|
||||
@ -1242,7 +1287,9 @@ static UINT urb_get_current_frame_number(IUDEVICE* pdev, GENERIC_CHANNEL_CALLBAC
|
||||
wStream* s, UINT32 RequestField, UINT32 MessageId,
|
||||
IUDEVMAN* udevman, int transferDir)
|
||||
{
|
||||
UINT32 out_size, InterfaceId, OutputBufferSize;
|
||||
UINT32 out_size;
|
||||
UINT32 InterfaceId;
|
||||
UINT32 OutputBufferSize;
|
||||
UINT32 dummy_frames;
|
||||
wStream* out;
|
||||
URBDRC_PLUGIN* urbdrc;
|
||||
@ -1306,7 +1353,9 @@ static UINT urb_control_get_configuration_request(IUDEVICE* pdev,
|
||||
IUDEVMAN* udevman, int transferDir)
|
||||
{
|
||||
size_t out_size;
|
||||
UINT32 InterfaceId, OutputBufferSize, usbd_status;
|
||||
UINT32 InterfaceId;
|
||||
UINT32 OutputBufferSize;
|
||||
UINT32 usbd_status;
|
||||
wStream* out;
|
||||
URBDRC_PLUGIN* urbdrc;
|
||||
const BOOL noAck = (RequestField & 0x80000000U) != 0;
|
||||
@ -1362,7 +1411,9 @@ static UINT urb_control_get_interface_request(IUDEVICE* pdev, GENERIC_CHANNEL_CA
|
||||
IUDEVMAN* udevman, int transferDir)
|
||||
{
|
||||
size_t out_size;
|
||||
UINT32 InterfaceId, OutputBufferSize, usbd_status;
|
||||
UINT32 InterfaceId;
|
||||
UINT32 OutputBufferSize;
|
||||
UINT32 usbd_status;
|
||||
UINT16 InterfaceNr;
|
||||
wStream* out;
|
||||
URBDRC_PLUGIN* urbdrc;
|
||||
@ -1419,9 +1470,13 @@ static UINT urb_control_feature_request(IUDEVICE* pdev, GENERIC_CHANNEL_CALLBACK
|
||||
IUDEVMAN* udevman, BYTE func_recipient, BYTE command,
|
||||
int transferDir)
|
||||
{
|
||||
UINT32 InterfaceId, OutputBufferSize, usbd_status;
|
||||
UINT16 FeatureSelector, Index;
|
||||
BYTE bmRequestType, bmRequest;
|
||||
UINT32 InterfaceId;
|
||||
UINT32 OutputBufferSize;
|
||||
UINT32 usbd_status;
|
||||
UINT16 FeatureSelector;
|
||||
UINT16 Index;
|
||||
BYTE bmRequestType;
|
||||
BYTE bmRequest;
|
||||
wStream* out;
|
||||
URBDRC_PLUGIN* urbdrc;
|
||||
const BOOL noAck = (RequestField & 0x80000000U) != 0;
|
||||
|
@ -84,7 +84,8 @@ static void request_free(void* value);
|
||||
|
||||
static struct libusb_transfer* list_contains(wArrayList* list, UINT32 streamID)
|
||||
{
|
||||
size_t x, count;
|
||||
size_t x;
|
||||
size_t count;
|
||||
if (!list)
|
||||
return NULL;
|
||||
count = ArrayList_Count(list);
|
||||
@ -328,7 +329,8 @@ static const LIBUSB_ENDPOINT_DESCEIPTOR* func_get_ep_desc(LIBUSB_CONFIG_DESCRIPT
|
||||
UINT32 EndpointAddress)
|
||||
{
|
||||
BYTE alt;
|
||||
UINT32 inum, pnum;
|
||||
UINT32 inum;
|
||||
UINT32 pnum;
|
||||
MSUSB_INTERFACE_DESCRIPTOR** MsInterfaces;
|
||||
const LIBUSB_INTERFACE* interface;
|
||||
const LIBUSB_ENDPOINT_DESCEIPTOR* endpoint;
|
||||
@ -483,7 +485,8 @@ static int func_config_release_all_interface(URBDRC_PLUGIN* urbdrc,
|
||||
static int func_claim_all_interface(URBDRC_PLUGIN* urbdrc, LIBUSB_DEVICE_HANDLE* libusb_handle,
|
||||
int NumInterfaces)
|
||||
{
|
||||
int i, ret;
|
||||
int i;
|
||||
int ret;
|
||||
|
||||
for (i = 0; i < NumInterfaces; i++)
|
||||
{
|
||||
@ -538,7 +541,8 @@ static LIBUSB_DEVICE_DESCRIPTOR* udev_new_descript(URBDRC_PLUGIN* urbdrc, LIBUSB
|
||||
|
||||
static int libusb_udev_select_interface(IUDEVICE* idev, BYTE InterfaceNumber, BYTE AlternateSetting)
|
||||
{
|
||||
int error = 0, diff = 0;
|
||||
int error = 0;
|
||||
int diff = 0;
|
||||
UDEVICE* pdev = (UDEVICE*)idev;
|
||||
URBDRC_PLUGIN* urbdrc;
|
||||
MSUSB_CONFIG_DESCRIPTOR* MsConfig;
|
||||
@ -595,7 +599,9 @@ libusb_udev_complete_msconfig_setup(IUDEVICE* idev, MSUSB_CONFIG_DESCRIPTOR* MsC
|
||||
const LIBUSB_ENDPOINT_DESCEIPTOR* LibusbEndpoint;
|
||||
BYTE LibusbNumEndpoint;
|
||||
URBDRC_PLUGIN* urbdrc;
|
||||
UINT32 inum = 0, pnum = 0, MsOutSize = 0;
|
||||
UINT32 inum = 0;
|
||||
UINT32 pnum = 0;
|
||||
UINT32 MsOutSize = 0;
|
||||
|
||||
if (!pdev || !pdev->LibusbConfig || !pdev->urbdrc || !MsConfig)
|
||||
return NULL;
|
||||
@ -831,10 +837,12 @@ static UINT32 libusb_udev_control_query_device_text(IUDEVICE* idev, UINT32 TextT
|
||||
BYTE bus_number;
|
||||
BYTE device_address;
|
||||
int ret = 0;
|
||||
size_t i, len;
|
||||
size_t i;
|
||||
size_t len;
|
||||
URBDRC_PLUGIN* urbdrc;
|
||||
WCHAR* text = (WCHAR*)Buffer;
|
||||
BYTE slen, locale;
|
||||
BYTE slen;
|
||||
BYTE locale;
|
||||
const UINT8 inSize = *BufferSize;
|
||||
|
||||
*BufferSize = 0;
|
||||
@ -1022,7 +1030,8 @@ static int libusb_udev_query_device_descriptor(IUDEVICE* idev, int offset)
|
||||
|
||||
static BOOL libusb_udev_detach_kernel_driver(IUDEVICE* idev)
|
||||
{
|
||||
int i, err = 0;
|
||||
int i;
|
||||
int err = 0;
|
||||
UDEVICE* pdev = (UDEVICE*)idev;
|
||||
URBDRC_PLUGIN* urbdrc;
|
||||
|
||||
@ -1057,7 +1066,8 @@ static BOOL libusb_udev_detach_kernel_driver(IUDEVICE* idev)
|
||||
|
||||
static BOOL libusb_udev_attach_kernel_driver(IUDEVICE* idev)
|
||||
{
|
||||
int i, err = 0;
|
||||
int i;
|
||||
int err = 0;
|
||||
UDEVICE* pdev = (UDEVICE*)idev;
|
||||
|
||||
if (!pdev || !pdev->LibusbConfig || !pdev->libusb_handle || !pdev->urbdrc)
|
||||
@ -1177,7 +1187,8 @@ static int libusb_udev_query_device_port_status(IUDEVICE* idev, UINT32* UsbdStat
|
||||
UINT32* BufferSize, BYTE* Buffer)
|
||||
{
|
||||
UDEVICE* pdev = (UDEVICE*)idev;
|
||||
int success = 0, ret;
|
||||
int success = 0;
|
||||
int ret;
|
||||
URBDRC_PLUGIN* urbdrc;
|
||||
|
||||
if (!pdev || !pdev->urbdrc)
|
||||
@ -1416,7 +1427,8 @@ static int func_cancel_xact_request(URBDRC_PLUGIN* urbdrc, struct libusb_transfe
|
||||
static void libusb_udev_cancel_all_transfer_request(IUDEVICE* idev)
|
||||
{
|
||||
UDEVICE* pdev = (UDEVICE*)idev;
|
||||
size_t count, x;
|
||||
size_t count;
|
||||
size_t x;
|
||||
|
||||
if (!pdev || !pdev->request_queue || !pdev->urbdrc)
|
||||
return;
|
||||
@ -1798,7 +1810,8 @@ size_t udev_new_by_id(URBDRC_PLUGIN* urbdrc, libusb_context* ctx, UINT16 idVendo
|
||||
{
|
||||
LIBUSB_DEVICE** libusb_list;
|
||||
UDEVICE** array;
|
||||
ssize_t i, total_device;
|
||||
ssize_t i;
|
||||
ssize_t total_device;
|
||||
size_t num = 0;
|
||||
|
||||
if (!urbdrc || !devArray)
|
||||
|
@ -145,7 +145,9 @@ static size_t udevman_register_udevice(IUDEVMAN* idevman, BYTE bus_number, BYTE
|
||||
IUDEVICE* pdev = NULL;
|
||||
IUDEVICE** devArray;
|
||||
URBDRC_PLUGIN* urbdrc;
|
||||
size_t i, num, addnum = 0;
|
||||
size_t i;
|
||||
size_t num;
|
||||
size_t addnum = 0;
|
||||
|
||||
if (!idevman || !idevman->plugin)
|
||||
return 0;
|
||||
@ -675,7 +677,8 @@ static BOOL urbdrc_udevman_register_devices(UDEVMAN* udevman, const char* device
|
||||
{
|
||||
const char* pos = devices;
|
||||
VID_PID_PAIR* idpair;
|
||||
UINT16 id1, id2;
|
||||
UINT16 id1;
|
||||
UINT16 id2;
|
||||
|
||||
while (*pos != '\0')
|
||||
{
|
||||
|
@ -66,9 +66,11 @@ static IWTSVirtualChannel* get_channel(IUDEVMAN* idevman)
|
||||
|
||||
static int func_container_id_generate(IUDEVICE* pdev, char* strContainerId)
|
||||
{
|
||||
char *p, *path;
|
||||
char* p;
|
||||
char* path;
|
||||
UINT8 containerId[17] = { 0 };
|
||||
UINT16 idVendor, idProduct;
|
||||
UINT16 idVendor;
|
||||
UINT16 idProduct;
|
||||
idVendor = (UINT16)pdev->query_device_descriptor(pdev, ID_VENDOR);
|
||||
idProduct = (UINT16)pdev->query_device_descriptor(pdev, ID_PRODUCT);
|
||||
path = pdev->getPath(pdev);
|
||||
@ -233,7 +235,8 @@ static UINT urdbrc_send_usb_device_add(GENERIC_CHANNEL_CALLBACK* callback, IUDEV
|
||||
size_t size;
|
||||
size_t CompatibilityIdLen[3];
|
||||
size_t HardwareIdsLen[2];
|
||||
size_t ContainerIdLen, InstanceIdLen;
|
||||
size_t ContainerIdLen;
|
||||
size_t InstanceIdLen;
|
||||
size_t cchCompatIds;
|
||||
UINT32 bcdUSB;
|
||||
InterfaceId = ((STREAM_ID_PROXY << 30) | CLIENT_DEVICE_SINK);
|
||||
@ -851,7 +854,8 @@ BOOL add_device(IUDEVMAN* idevman, UINT32 flags, BYTE busnum, BYTE devnum, UINT1
|
||||
{
|
||||
size_t success = 0;
|
||||
URBDRC_PLUGIN* urbdrc;
|
||||
UINT32 mask, regflags = 0;
|
||||
UINT32 mask;
|
||||
UINT32 regflags = 0;
|
||||
|
||||
if (!idevman)
|
||||
return FALSE;
|
||||
|
@ -315,7 +315,8 @@ void msusb_msconfig_free(MSUSB_CONFIG_DESCRIPTOR* MsConfig)
|
||||
MSUSB_CONFIG_DESCRIPTOR* msusb_msconfig_read(wStream* s, UINT32 NumInterfaces)
|
||||
{
|
||||
MSUSB_CONFIG_DESCRIPTOR* MsConfig;
|
||||
BYTE lenConfiguration, typeConfiguration;
|
||||
BYTE lenConfiguration;
|
||||
BYTE typeConfiguration;
|
||||
|
||||
if (!Stream_CheckAndLogRequiredCapacityOfSize(TAG, (s), 3ULL + NumInterfaces, 2ULL))
|
||||
return NULL;
|
||||
@ -356,7 +357,8 @@ void msusb_msconfig_dump(MSUSB_CONFIG_DESCRIPTOR* MsConfig)
|
||||
MSUSB_INTERFACE_DESCRIPTOR* MsInterface;
|
||||
MSUSB_PIPE_DESCRIPTOR** MsPipes;
|
||||
MSUSB_PIPE_DESCRIPTOR* MsPipe;
|
||||
UINT32 inum = 0, pnum = 0;
|
||||
UINT32 inum = 0;
|
||||
UINT32 pnum = 0;
|
||||
WLog_INFO(TAG, "=================MsConfig:========================");
|
||||
WLog_INFO(TAG, "wTotalLength:%" PRIu16 "", MsConfig->wTotalLength);
|
||||
WLog_INFO(TAG, "bConfigurationValue:%" PRIu8 "", MsConfig->bConfigurationValue);
|
||||
|
@ -386,8 +386,11 @@ const char* urb_function_string(UINT16 urb)
|
||||
void urbdrc_dump_message(wLog* log, BOOL client, BOOL write, wStream* s)
|
||||
{
|
||||
const char* type = write ? "WRITE" : "READ";
|
||||
UINT32 InterfaceId, MessageId, FunctionId;
|
||||
size_t length, pos;
|
||||
UINT32 InterfaceId;
|
||||
UINT32 MessageId;
|
||||
UINT32 FunctionId;
|
||||
size_t length;
|
||||
size_t pos;
|
||||
|
||||
pos = Stream_GetPosition(s);
|
||||
if (write)
|
||||
|
@ -575,7 +575,8 @@ static UINT video_control_on_data_received(IWTSVirtualChannelCallback* pChannelC
|
||||
VIDEO_PLUGIN* video;
|
||||
VideoClientContext* context;
|
||||
UINT ret = CHANNEL_RC_OK;
|
||||
UINT32 cbSize, packetType;
|
||||
UINT32 cbSize;
|
||||
UINT32 packetType;
|
||||
|
||||
WINPR_ASSERT(callback);
|
||||
WINPR_ASSERT(s);
|
||||
@ -676,7 +677,8 @@ static void video_timer(VideoClientContext* video, UINT64 now)
|
||||
{
|
||||
PresentationContext* presentation;
|
||||
VideoClientContextPriv* priv;
|
||||
VideoFrame *peekFrame, *frame = NULL;
|
||||
VideoFrame* peekFrame;
|
||||
VideoFrame* frame = NULL;
|
||||
|
||||
WINPR_ASSERT(video);
|
||||
|
||||
@ -839,7 +841,8 @@ static UINT video_VideoData(VideoClientContext* context, const TSMM_VIDEO_DATA*
|
||||
{
|
||||
VideoSurface* surface = presentation->surface;
|
||||
H264_CONTEXT* h264 = presentation->h264;
|
||||
UINT64 startTime = GetTickCount64(), timeAfterH264;
|
||||
UINT64 startTime = GetTickCount64();
|
||||
UINT64 timeAfterH264;
|
||||
MAPPED_GEOMETRY* geom = presentation->geometry;
|
||||
|
||||
const RECTANGLE_16 rect = { 0, 0, surface->alignedWidth, surface->alignedHeight };
|
||||
@ -932,7 +935,8 @@ static UINT video_data_on_data_received(IWTSVirtualChannelCallback* pChannelCall
|
||||
GENERIC_CHANNEL_CALLBACK* callback = (GENERIC_CHANNEL_CALLBACK*)pChannelCallback;
|
||||
VIDEO_PLUGIN* video;
|
||||
VideoClientContext* context;
|
||||
UINT32 cbSize, packetType;
|
||||
UINT32 cbSize;
|
||||
UINT32 packetType;
|
||||
TSMM_VIDEO_DATA data;
|
||||
|
||||
video = (VIDEO_PLUGIN*)callback->plugin;
|
||||
|
@ -31,7 +31,8 @@ static std::vector<std::string> split(const std::string& input, const std::strin
|
||||
{
|
||||
// passing -1 as the submatch index parameter performs splitting
|
||||
std::regex re(regex);
|
||||
std::sregex_token_iterator first{ input.begin(), input.end(), re, -1 }, last;
|
||||
std::sregex_token_iterator first{ input.begin(), input.end(), re, -1 };
|
||||
std::sregex_token_iterator last;
|
||||
return { first, last };
|
||||
}
|
||||
|
||||
|
@ -391,7 +391,8 @@ static BOOL sdl_draw_to_window(SdlContext* sdl, SdlWindow& window,
|
||||
|
||||
SDL_Surface* screen = SDL_GetWindowSurface(window.window());
|
||||
|
||||
int w, h;
|
||||
int w;
|
||||
int h;
|
||||
SDL_GetWindowSize(window.window(), &w, &h);
|
||||
|
||||
if (!freerdp_settings_get_bool(context->settings, FreeRDP_SmartSizing))
|
||||
|
@ -107,7 +107,12 @@ static BOOL sdl_Pointer_Set(rdpContext* context, rdpPointer* pointer)
|
||||
|
||||
BOOL sdl_Pointer_Set_Process(SDL_UserEvent* uptr)
|
||||
{
|
||||
INT32 w, h, x, y, sw, sh;
|
||||
INT32 w;
|
||||
INT32 h;
|
||||
INT32 x;
|
||||
INT32 y;
|
||||
INT32 sw;
|
||||
INT32 sh;
|
||||
|
||||
WINPR_ASSERT(uptr);
|
||||
|
||||
|
@ -56,7 +56,8 @@ BOOL sdl_scale_coordinates(SdlContext* sdl, Uint32 windowId, INT32* px, INT32* p
|
||||
int offset_y = 0;
|
||||
for (const auto& window : sdl->windows)
|
||||
{
|
||||
int w, h;
|
||||
int w;
|
||||
int h;
|
||||
const Uint32 id = SDL_GetWindowID(window.window());
|
||||
if (id != windowId)
|
||||
{
|
||||
@ -162,7 +163,8 @@ BOOL sdl_handle_touch_up(SdlContext* sdl, const SDL_TouchFingerEvent* ev)
|
||||
WINPR_ASSERT(sdl);
|
||||
WINPR_ASSERT(ev);
|
||||
|
||||
INT32 x, y;
|
||||
INT32 x;
|
||||
INT32 y;
|
||||
if (!sdl_get_touch_scaled(sdl, ev, &x, &y, TRUE))
|
||||
return FALSE;
|
||||
return freerdp_client_handle_touch(sdl->common(), FREERDP_TOUCH_UP | FREERDP_TOUCH_HAS_PRESSURE,
|
||||
@ -175,7 +177,8 @@ BOOL sdl_handle_touch_down(SdlContext* sdl, const SDL_TouchFingerEvent* ev)
|
||||
WINPR_ASSERT(sdl);
|
||||
WINPR_ASSERT(ev);
|
||||
|
||||
INT32 x, y;
|
||||
INT32 x;
|
||||
INT32 y;
|
||||
if (!sdl_get_touch_scaled(sdl, ev, &x, &y, TRUE))
|
||||
return FALSE;
|
||||
return freerdp_client_handle_touch(
|
||||
@ -188,7 +191,8 @@ BOOL sdl_handle_touch_motion(SdlContext* sdl, const SDL_TouchFingerEvent* ev)
|
||||
WINPR_ASSERT(sdl);
|
||||
WINPR_ASSERT(ev);
|
||||
|
||||
INT32 x, y;
|
||||
INT32 x;
|
||||
INT32 y;
|
||||
if (!sdl_get_touch_scaled(sdl, ev, &x, &y, TRUE))
|
||||
return FALSE;
|
||||
return freerdp_client_handle_touch(
|
||||
|
@ -435,7 +435,8 @@ BOOL wlf_disp_uninit(wlfDispContext* wlfDisp, DispClientContext* disp)
|
||||
|
||||
int wlf_list_monitors(wlfContext* wlc)
|
||||
{
|
||||
uint32_t i, nmonitors = UwacDisplayGetNbOutputs(wlc->display);
|
||||
uint32_t i;
|
||||
uint32_t nmonitors = UwacDisplayGetNbOutputs(wlc->display);
|
||||
|
||||
for (i = 0; i < nmonitors; i++)
|
||||
{
|
||||
|
@ -61,7 +61,8 @@ static BOOL scale_signed_coordinates(rdpContext* context, int32_t* x, int32_t* y
|
||||
|
||||
BOOL wlf_handle_pointer_enter(freerdp* instance, const UwacPointerEnterLeaveEvent* ev)
|
||||
{
|
||||
uint32_t x, y;
|
||||
uint32_t x;
|
||||
uint32_t y;
|
||||
rdpClientContext* cctx;
|
||||
|
||||
if (!instance || !ev)
|
||||
@ -81,7 +82,8 @@ BOOL wlf_handle_pointer_enter(freerdp* instance, const UwacPointerEnterLeaveEven
|
||||
|
||||
BOOL wlf_handle_pointer_motion(freerdp* instance, const UwacPointerMotionEvent* ev)
|
||||
{
|
||||
uint32_t x, y;
|
||||
uint32_t x;
|
||||
uint32_t y;
|
||||
rdpClientContext* cctx;
|
||||
|
||||
if (!instance || !ev)
|
||||
@ -106,7 +108,8 @@ BOOL wlf_handle_pointer_buttons(freerdp* instance, const UwacPointerButtonEvent*
|
||||
rdpClientContext* cctx;
|
||||
UINT16 flags = 0;
|
||||
UINT16 xflags = 0;
|
||||
uint32_t x, y;
|
||||
uint32_t x;
|
||||
uint32_t y;
|
||||
|
||||
if (!instance || !ev)
|
||||
return FALSE;
|
||||
@ -397,7 +400,8 @@ BOOL wlf_keyboard_modifiers(freerdp* instance, const UwacKeyboardModifiersEvent*
|
||||
|
||||
BOOL wlf_handle_touch_up(freerdp* instance, const UwacTouchUp* ev)
|
||||
{
|
||||
int32_t x, y;
|
||||
int32_t x;
|
||||
int32_t y;
|
||||
|
||||
WINPR_ASSERT(instance);
|
||||
WINPR_ASSERT(ev);
|
||||
@ -416,7 +420,8 @@ BOOL wlf_handle_touch_up(freerdp* instance, const UwacTouchUp* ev)
|
||||
|
||||
BOOL wlf_handle_touch_down(freerdp* instance, const UwacTouchDown* ev)
|
||||
{
|
||||
int32_t x, y;
|
||||
int32_t x;
|
||||
int32_t y;
|
||||
|
||||
WINPR_ASSERT(instance);
|
||||
WINPR_ASSERT(ev);
|
||||
@ -435,7 +440,8 @@ BOOL wlf_handle_touch_down(freerdp* instance, const UwacTouchDown* ev)
|
||||
|
||||
BOOL wlf_handle_touch_motion(freerdp* instance, const UwacTouchMotion* ev)
|
||||
{
|
||||
int32_t x, y;
|
||||
int32_t x;
|
||||
int32_t y;
|
||||
|
||||
WINPR_ASSERT(instance);
|
||||
WINPR_ASSERT(ev);
|
||||
|
@ -71,7 +71,10 @@ static BOOL wlf_Pointer_Set(rdpContext* context, rdpPointer* pointer)
|
||||
wlfContext* wlf = (wlfContext*)context;
|
||||
wlfPointer* ptr = (wlfPointer*)pointer;
|
||||
void* data;
|
||||
UINT32 w, h, x, y;
|
||||
UINT32 w;
|
||||
UINT32 h;
|
||||
UINT32 x;
|
||||
UINT32 y;
|
||||
size_t size;
|
||||
UwacReturnCode rc;
|
||||
BOOL res = FALSE;
|
||||
|
@ -51,7 +51,10 @@ static BOOL wl_update_buffer(wlfContext* context_w, INT32 ix, INT32 iy, INT32 iw
|
||||
BOOL res = FALSE;
|
||||
rdpGdi* gdi;
|
||||
char* data;
|
||||
UINT32 x, y, w, h;
|
||||
UINT32 x;
|
||||
UINT32 y;
|
||||
UINT32 w;
|
||||
UINT32 h;
|
||||
UwacSize geometry;
|
||||
size_t stride;
|
||||
UwacReturnCode rc;
|
||||
@ -119,8 +122,10 @@ static BOOL wl_end_paint(rdpContext* context)
|
||||
{
|
||||
rdpGdi* gdi;
|
||||
wlfContext* context_w;
|
||||
INT32 x, y;
|
||||
INT32 w, h;
|
||||
INT32 x;
|
||||
INT32 y;
|
||||
INT32 w;
|
||||
INT32 h;
|
||||
|
||||
if (!context || !context->gdi || !context->gdi->primary)
|
||||
return FALSE;
|
||||
@ -224,7 +229,8 @@ static BOOL wl_post_connect(freerdp* instance)
|
||||
rdpSettings* settings;
|
||||
char* title = "FreeRDP";
|
||||
char* app_id = "wlfreerdp";
|
||||
UINT32 w, h;
|
||||
UINT32 w;
|
||||
UINT32 h;
|
||||
|
||||
if (!instance || !instance->context)
|
||||
return FALSE;
|
||||
@ -770,7 +776,8 @@ BOOL wlf_scale_coordinates(rdpContext* context, UINT32* px, UINT32* py, BOOL fro
|
||||
wlfContext* wlf = (wlfContext*)context;
|
||||
rdpGdi* gdi;
|
||||
UwacSize geometry;
|
||||
double sx, sy;
|
||||
double sx;
|
||||
double sy;
|
||||
|
||||
if (!context || !px || !py || !context->gdi)
|
||||
return FALSE;
|
||||
|
@ -880,7 +880,9 @@ static BOOL xf_play_sound(rdpContext* context, const PLAY_SOUND_UPDATE* play_sou
|
||||
|
||||
static void xf_check_extensions(xfContext* context)
|
||||
{
|
||||
int xkb_opcode, xkb_event, xkb_error;
|
||||
int xkb_opcode;
|
||||
int xkb_event;
|
||||
int xkb_error;
|
||||
int xkb_major = XkbMajorVersion;
|
||||
int xkb_minor = XkbMinorVersion;
|
||||
|
||||
@ -914,12 +916,15 @@ static const size_t TEST_PTR_LEN = sizeof(TEST_PTR_STR) / sizeof(char);
|
||||
static void xf_get_x11_button_map(xfContext* xfc, unsigned char* x11_map)
|
||||
{
|
||||
#ifdef WITH_XI
|
||||
int opcode, event, error;
|
||||
int opcode;
|
||||
int event;
|
||||
int error;
|
||||
XDevice* ptr_dev;
|
||||
XExtensionVersion* version;
|
||||
XDeviceInfo* devices1;
|
||||
XIDeviceInfo* devices2;
|
||||
int i, num_devices;
|
||||
int i;
|
||||
int num_devices;
|
||||
|
||||
if (XQueryExtension(xfc->display, "XInputExtension", &opcode, &event, &error))
|
||||
{
|
||||
@ -1683,7 +1688,8 @@ static void xf_TerminateEventHandler(void* context, const TerminateEventArgs* e)
|
||||
#ifdef WITH_XRENDER
|
||||
static void xf_ZoomingChangeEventHandler(void* context, const ZoomingChangeEventArgs* e)
|
||||
{
|
||||
int w, h;
|
||||
int w;
|
||||
int h;
|
||||
rdpSettings* settings;
|
||||
xfContext* xfc = (xfContext*)context;
|
||||
|
||||
@ -1876,7 +1882,8 @@ BOOL xf_setup_x11(xfContext* xfc)
|
||||
{
|
||||
Atom actual_type = 0;
|
||||
int actual_format = 0;
|
||||
unsigned long nitems = 0, after = 0;
|
||||
unsigned long nitems = 0;
|
||||
unsigned long after = 0;
|
||||
unsigned char* data = NULL;
|
||||
int status = LogTagAndXGetWindowProperty(
|
||||
TAG, xfc->display, RootWindowOfScreen(xfc->screen), xfc->_NET_SUPPORTED, 0, 1024, False,
|
||||
|
@ -709,7 +709,8 @@ static BOOL xf_clipboard_format_equal(const CLIPRDR_FORMAT* a, const CLIPRDR_FOR
|
||||
static BOOL xf_clipboard_changed(xfClipboard* clipboard, const CLIPRDR_FORMAT* formats,
|
||||
UINT32 numFormats)
|
||||
{
|
||||
UINT32 x, y;
|
||||
UINT32 x;
|
||||
UINT32 y;
|
||||
|
||||
WINPR_ASSERT(clipboard);
|
||||
WINPR_ASSERT(formats || (numFormats == 0));
|
||||
@ -2276,7 +2277,8 @@ xfClipboard* xf_clipboard_new(xfContext* xfc, BOOL relieveFilenameRestriction)
|
||||
if (XFixesQueryExtension(xfc->display, &clipboard->xfixes_event_base,
|
||||
&clipboard->xfixes_error_base))
|
||||
{
|
||||
int xfmajor, xfminor;
|
||||
int xfmajor;
|
||||
int xfminor;
|
||||
|
||||
if (XFixesQueryVersion(xfc->display, &xfmajor, &xfminor))
|
||||
{
|
||||
|
@ -433,7 +433,8 @@ BOOL xf_disp_handle_xevent(xfContext* xfc, const XEvent* event)
|
||||
{
|
||||
xfDispContext* xfDisp;
|
||||
rdpSettings* settings;
|
||||
UINT32 maxWidth, maxHeight;
|
||||
UINT32 maxWidth;
|
||||
UINT32 maxHeight;
|
||||
|
||||
if (!xfc || !event)
|
||||
return FALSE;
|
||||
|
@ -280,7 +280,8 @@ static BOOL xf_event_execute_action_script(xfContext* xfc, const XEvent* event)
|
||||
void xf_adjust_coordinates_to_screen(xfContext* xfc, UINT32* x, UINT32* y)
|
||||
{
|
||||
rdpSettings* settings;
|
||||
INT64 tx, ty;
|
||||
INT64 tx;
|
||||
INT64 ty;
|
||||
|
||||
if (!xfc || !xfc->common.context.settings || !y || !x)
|
||||
return;
|
||||
@ -337,8 +338,10 @@ void xf_event_adjust_coordinates(xfContext* xfc, int* x, int* y)
|
||||
|
||||
static BOOL xf_event_Expose(xfContext* xfc, const XExposeEvent* event, BOOL app)
|
||||
{
|
||||
int x, y;
|
||||
int w, h;
|
||||
int x;
|
||||
int y;
|
||||
int w;
|
||||
int h;
|
||||
rdpSettings* settings;
|
||||
|
||||
WINPR_ASSERT(xfc);
|
||||
@ -809,7 +812,8 @@ static BOOL xf_event_ConfigureNotify(xfContext* xfc, const XConfigureEvent* even
|
||||
|
||||
if (freerdp_settings_get_bool(settings, FreeRDP_DynamicResolutionUpdate))
|
||||
{
|
||||
int alignedWidth, alignedHeight;
|
||||
int alignedWidth;
|
||||
int alignedHeight;
|
||||
alignedWidth = (xfc->window->width / 2) * 2;
|
||||
alignedHeight = (xfc->window->height / 2) * 2;
|
||||
/* ask the server to resize using the display channel */
|
||||
|
@ -222,7 +222,8 @@ static BOOL create_floatbar(xfFloatbar* floatbar)
|
||||
|
||||
BOOL xf_floatbar_toggle_fullscreen(xfFloatbar* floatbar, bool fullscreen)
|
||||
{
|
||||
int i, size;
|
||||
int i;
|
||||
int size;
|
||||
bool visible = False;
|
||||
xfContext* xfc;
|
||||
|
||||
@ -388,9 +389,11 @@ static unsigned long xf_floatbar_get_color(xfFloatbar* floatbar, char* rgb_value
|
||||
|
||||
static void xf_floatbar_event_expose(xfFloatbar* floatbar)
|
||||
{
|
||||
GC gc, shape_gc;
|
||||
GC gc;
|
||||
GC shape_gc;
|
||||
Pixmap pmap;
|
||||
XPoint shape[5] = { 0 }, border[5] = { 0 };
|
||||
XPoint shape[5] = { 0 };
|
||||
XPoint border[5] = { 0 };
|
||||
int len;
|
||||
|
||||
WINPR_ASSERT(floatbar);
|
||||
@ -638,7 +641,9 @@ static void xf_floatbar_event_buttonrelease(xfFloatbar* floatbar, const XButtonE
|
||||
|
||||
static void xf_floatbar_resize(xfFloatbar* floatbar, const XMotionEvent* event)
|
||||
{
|
||||
int x, width, movement;
|
||||
int x;
|
||||
int width;
|
||||
int movement;
|
||||
|
||||
WINPR_ASSERT(floatbar);
|
||||
WINPR_ASSERT(event);
|
||||
@ -673,7 +678,8 @@ static void xf_floatbar_resize(xfFloatbar* floatbar, const XMotionEvent* event)
|
||||
|
||||
static void xf_floatbar_dragging(xfFloatbar* floatbar, const XMotionEvent* event)
|
||||
{
|
||||
int x, movement;
|
||||
int x;
|
||||
int movement;
|
||||
|
||||
WINPR_ASSERT(floatbar);
|
||||
WINPR_ASSERT(event);
|
||||
@ -892,7 +898,8 @@ static void xf_floatbar_button_free(xfContext* xfc, xfFloatbarButton* button)
|
||||
|
||||
void xf_floatbar_free(xfFloatbar* floatbar)
|
||||
{
|
||||
size_t i, size;
|
||||
size_t i;
|
||||
size_t size;
|
||||
xfContext* xfc;
|
||||
|
||||
if (!floatbar)
|
||||
|
@ -33,12 +33,15 @@
|
||||
static UINT xf_OutputUpdate(xfContext* xfc, xfGfxSurface* surface)
|
||||
{
|
||||
UINT rc = ERROR_INTERNAL_ERROR;
|
||||
UINT32 surfaceX, surfaceY;
|
||||
UINT32 surfaceX;
|
||||
UINT32 surfaceY;
|
||||
RECTANGLE_16 surfaceRect;
|
||||
rdpGdi* gdi;
|
||||
const rdpSettings* settings;
|
||||
UINT32 nbRects, x;
|
||||
double sx, sy;
|
||||
UINT32 nbRects;
|
||||
UINT32 x;
|
||||
double sx;
|
||||
double sy;
|
||||
const RECTANGLE_16* rects;
|
||||
|
||||
WINPR_ASSERT(xfc);
|
||||
|
@ -48,7 +48,10 @@ static BOOL xf_Pointer_Set(rdpContext* context, rdpPointer* pointer);
|
||||
BOOL xf_decode_color(xfContext* xfc, const UINT32 srcColor, XColor* color)
|
||||
{
|
||||
UINT32 SrcFormat = 0;
|
||||
BYTE r = 0, g = 0, b = 0, a = 0;
|
||||
BYTE r = 0;
|
||||
BYTE g = 0;
|
||||
BYTE b = 0;
|
||||
BYTE a = 0;
|
||||
|
||||
if (!xfc || !color)
|
||||
return FALSE;
|
||||
|
@ -243,7 +243,9 @@ int xf_input_init(xfContext* xfc, Window window)
|
||||
{
|
||||
int major = XI_2_Major;
|
||||
int minor = XI_2_Minor;
|
||||
int opcode = 0, event = 0, error = 0;
|
||||
int opcode = 0;
|
||||
int event = 0;
|
||||
int error = 0;
|
||||
|
||||
WINPR_ASSERT(xfc);
|
||||
|
||||
@ -656,7 +658,8 @@ static void xf_input_show_cursor(xfContext* xfc)
|
||||
|
||||
static int xf_input_touch_remote(xfContext* xfc, XIDeviceEvent* event, int evtype)
|
||||
{
|
||||
int x, y;
|
||||
int x;
|
||||
int y;
|
||||
int touchId;
|
||||
RdpeiClientContext* rdpei = xfc->common.rdpei;
|
||||
|
||||
@ -689,7 +692,8 @@ static int xf_input_touch_remote(xfContext* xfc, XIDeviceEvent* event, int evtyp
|
||||
|
||||
static BOOL xf_input_pen_remote(xfContext* xfc, XIDeviceEvent* event, int evtype, int deviceid)
|
||||
{
|
||||
int x, y;
|
||||
int x;
|
||||
int y;
|
||||
RdpeiClientContext* rdpei = xfc->common.rdpei;
|
||||
|
||||
if (!rdpei)
|
||||
|
@ -422,7 +422,9 @@ void xf_keyboard_focus_in(xfContext* xfc)
|
||||
{
|
||||
UINT32 state = 0;
|
||||
Window w = None;
|
||||
int d = 0, x = 0, y = 0;
|
||||
int d = 0;
|
||||
int x = 0;
|
||||
int y = 0;
|
||||
|
||||
WINPR_ASSERT(xfc);
|
||||
if (!xfc->display || !xfc->window)
|
||||
|
@ -56,8 +56,10 @@
|
||||
int xf_list_monitors(xfContext* xfc)
|
||||
{
|
||||
Display* display;
|
||||
int major, minor;
|
||||
int i, nmonitors = 0;
|
||||
int major;
|
||||
int minor;
|
||||
int i;
|
||||
int nmonitors = 0;
|
||||
display = XOpenDisplay(NULL);
|
||||
|
||||
if (!display)
|
||||
@ -144,12 +146,15 @@ BOOL xf_detect_monitors(xfContext* xfc, UINT32* pMaxWidth, UINT32* pMaxHeight)
|
||||
BOOL primaryMonitorFound = FALSE;
|
||||
VIRTUAL_SCREEN* vscreen = NULL;
|
||||
rdpSettings* settings = NULL;
|
||||
int mouse_x = 0, mouse_y = 0, _dummy_i = 0;
|
||||
int mouse_x = 0;
|
||||
int mouse_y = 0;
|
||||
int _dummy_i = 0;
|
||||
Window _dummy_w = 0;
|
||||
int current_monitor = 0;
|
||||
Screen* screen = NULL;
|
||||
#if defined WITH_XINERAMA || defined WITH_XRANDR
|
||||
int major = 0, minor = 0;
|
||||
int major = 0;
|
||||
int minor = 0;
|
||||
#endif
|
||||
#if defined(USABLE_XRANDR)
|
||||
XRRMonitorInfo* rrmonitors = NULL;
|
||||
@ -429,7 +434,8 @@ BOOL xf_detect_monitors(xfContext* xfc, UINT32* pMaxWidth, UINT32* pMaxHeight)
|
||||
|
||||
if (useXRandr && rrmonitors)
|
||||
{
|
||||
Rotation rot, ret;
|
||||
Rotation rot;
|
||||
Rotation ret;
|
||||
attrs = &monitor->attributes;
|
||||
attrs->physicalWidth = rrmonitors[i].mwidth;
|
||||
attrs->physicalHeight = rrmonitors[i].mheight;
|
||||
@ -457,7 +463,8 @@ BOOL xf_detect_monitors(xfContext* xfc, UINT32* pMaxWidth, UINT32* pMaxHeight)
|
||||
* to go fullscreen on the current monitor only */
|
||||
if (nmonitors == 0 && vscreen->nmonitors > 0)
|
||||
{
|
||||
INT32 width, height;
|
||||
INT32 width;
|
||||
INT32 height;
|
||||
if (!vscreen->monitors)
|
||||
goto fail;
|
||||
|
||||
|
@ -155,7 +155,8 @@ void xf_rail_adjust_position(xfContext* xfc, xfAppWindow* appWindow)
|
||||
|
||||
void xf_rail_end_local_move(xfContext* xfc, xfAppWindow* appWindow)
|
||||
{
|
||||
int x, y;
|
||||
int x;
|
||||
int y;
|
||||
int child_x;
|
||||
int child_y;
|
||||
unsigned int mask;
|
||||
@ -902,7 +903,8 @@ static UINT xf_rail_server_handshake_ex(RailClientContext* context,
|
||||
static UINT xf_rail_server_local_move_size(RailClientContext* context,
|
||||
const RAIL_LOCALMOVESIZE_ORDER* localMoveSize)
|
||||
{
|
||||
int x = 0, y = 0;
|
||||
int x = 0;
|
||||
int y = 0;
|
||||
int direction = 0;
|
||||
Window child_window;
|
||||
xfContext* xfc = (xfContext*)context->custom;
|
||||
|
@ -73,7 +73,8 @@ static BOOL xf_tsmf_is_format_supported(xfXvContext* xv, UINT32 pixfmt)
|
||||
static int xf_tsmf_xv_video_frame_event(TsmfClientContext* tsmf, TSMF_VIDEO_FRAME_EVENT* event)
|
||||
{
|
||||
int i;
|
||||
int x, y;
|
||||
int x;
|
||||
int y;
|
||||
UINT32 width;
|
||||
UINT32 height;
|
||||
BYTE* data1;
|
||||
|
@ -161,7 +161,8 @@ void xf_SetWindowFullscreen(xfContext* xfc, xfWindow* window, BOOL fullscreen)
|
||||
{
|
||||
UINT32 i;
|
||||
const rdpSettings* settings;
|
||||
int startX, startY;
|
||||
int startX;
|
||||
int startY;
|
||||
UINT32 width = window->width;
|
||||
UINT32 height = window->height;
|
||||
|
||||
@ -1112,7 +1113,8 @@ void xf_SetWindowVisibilityRects(xfContext* xfc, xfAppWindow* appWindow, UINT32
|
||||
void xf_UpdateWindowArea(xfContext* xfc, xfAppWindow* appWindow, int x, int y, int width,
|
||||
int height)
|
||||
{
|
||||
int ax, ay;
|
||||
int ax;
|
||||
int ay;
|
||||
const rdpSettings* settings;
|
||||
|
||||
WINPR_ASSERT(xfc);
|
||||
|
@ -364,7 +364,8 @@ out:
|
||||
|
||||
int freerdp_client_settings_parse_assistance_file(rdpSettings* settings, int argc, char* argv[])
|
||||
{
|
||||
int status, x;
|
||||
int status;
|
||||
int x;
|
||||
int ret = -1;
|
||||
char* filename;
|
||||
char* password = NULL;
|
||||
@ -1514,7 +1515,8 @@ BOOL freerdp_client_send_wheel_event(rdpClientContext* cctx, UINT16 mflags)
|
||||
{
|
||||
UINT rc;
|
||||
UINT64 flags = 0;
|
||||
INT32 x = 0, y = 0;
|
||||
INT32 x = 0;
|
||||
INT32 y = 0;
|
||||
INT32 value = mflags & 0xFF;
|
||||
|
||||
if (mflags & PTR_FLAGS_WHEEL_NEGATIVE)
|
||||
|
@ -783,7 +783,8 @@ static void write_file_attributes(CliprdrFuseFile* fuse_file, struct stat* attr)
|
||||
static void cliprdr_file_fuse_lookup(fuse_req_t fuse_req, fuse_ino_t parent_ino, const char* name)
|
||||
{
|
||||
CliprdrFileContext* file_context = fuse_req_userdata(fuse_req);
|
||||
CliprdrFuseFile *parent, *fuse_file;
|
||||
CliprdrFuseFile* parent;
|
||||
CliprdrFuseFile* fuse_file;
|
||||
struct fuse_entry_param entry = { 0 };
|
||||
|
||||
WINPR_ASSERT(file_context);
|
||||
@ -1020,9 +1021,11 @@ static void cliprdr_file_fuse_readdir(fuse_req_t fuse_req, fuse_ino_t fuse_ino,
|
||||
off_t offset, struct fuse_file_info* file_info)
|
||||
{
|
||||
CliprdrFileContext* file_context = fuse_req_userdata(fuse_req);
|
||||
CliprdrFuseFile *fuse_file, *child;
|
||||
CliprdrFuseFile* fuse_file;
|
||||
CliprdrFuseFile* child;
|
||||
struct stat attr = { 0 };
|
||||
size_t written_size, entry_size;
|
||||
size_t written_size;
|
||||
size_t entry_size;
|
||||
char* filename;
|
||||
char* buf;
|
||||
off_t i;
|
||||
|
@ -1395,7 +1395,8 @@ BOOL freerdp_set_connection_type(rdpSettings* settings, UINT32 type)
|
||||
|
||||
static UINT32 freerdp_get_keyboard_layout_for_type(const char* name, DWORD type)
|
||||
{
|
||||
size_t count = 0, x;
|
||||
size_t count = 0;
|
||||
size_t x;
|
||||
RDP_KEYBOARD_LAYOUT* layouts =
|
||||
freerdp_keyboard_get_layouts(RDP_KEYBOARD_LAYOUT_TYPE_STANDARD, &count);
|
||||
|
||||
@ -1598,7 +1599,8 @@ int freerdp_client_settings_command_line_status_print(rdpSettings* settings, int
|
||||
static void freerdp_client_print_keyboard_type_list(const char* msg, DWORD type)
|
||||
{
|
||||
|
||||
size_t x, count = 0;
|
||||
size_t x;
|
||||
size_t count = 0;
|
||||
RDP_KEYBOARD_LAYOUT* layouts;
|
||||
layouts = freerdp_keyboard_get_layouts(type, &count);
|
||||
|
||||
@ -2136,7 +2138,8 @@ static int parse_tls_options(rdpSettings* settings, const COMMAND_LINE_ARGUMENT_
|
||||
WINPR_ASSERT(settings);
|
||||
WINPR_ASSERT(arg);
|
||||
|
||||
size_t count, x;
|
||||
size_t count;
|
||||
size_t x;
|
||||
char** ptr = CommandLineParseCommaSeparatedValues(arg->Value, &count);
|
||||
for (x = 0; x < count; x++)
|
||||
{
|
||||
@ -2346,7 +2349,8 @@ static int parse_codec_cache_options(rdpSettings* settings, const COMMAND_LINE_A
|
||||
|
||||
static BOOL check_kbd_remap_valid(const char* token)
|
||||
{
|
||||
DWORD key, value;
|
||||
DWORD key;
|
||||
DWORD value;
|
||||
|
||||
WINPR_ASSERT(token);
|
||||
/* The remapping is only allowed for scancodes, so maximum is 999=999 */
|
||||
@ -2545,7 +2549,8 @@ static int parse_size_options(rdpSettings* settings, const COMMAND_LINE_ARGUMENT
|
||||
|
||||
if (p)
|
||||
{
|
||||
unsigned long w, h;
|
||||
unsigned long w;
|
||||
unsigned long h;
|
||||
|
||||
if (!parseSizeValue(arg->Value, &w, &h) || (w > UINT16_MAX) || (h > UINT16_MAX))
|
||||
return COMMAND_LINE_ERROR_UNEXPECTED_VALUE;
|
||||
@ -2691,7 +2696,8 @@ static int parse_smart_sizing_options(rdpSettings* settings, const COMMAND_LINE_
|
||||
|
||||
if (arg->Value)
|
||||
{
|
||||
unsigned long w, h;
|
||||
unsigned long w;
|
||||
unsigned long h;
|
||||
|
||||
if (!parseSizeValue(arg->Value, &w, &h) || (w > UINT16_MAX) || (h > UINT16_MAX))
|
||||
return COMMAND_LINE_ERROR_UNEXPECTED_VALUE;
|
||||
@ -2939,7 +2945,8 @@ static int parse_clipboard_options(rdpSettings* settings, const COMMAND_LINE_ARG
|
||||
char** p;
|
||||
const char** pc;
|
||||
} ptr;
|
||||
size_t count, x;
|
||||
size_t count;
|
||||
size_t x;
|
||||
ptr.p = CommandLineParseCommaSeparatedValues(arg->Value, &count);
|
||||
for (x = 0; (x < count) && (rc == 0); x++)
|
||||
{
|
||||
@ -3105,7 +3112,8 @@ static int parse_sec_options(rdpSettings* settings, const COMMAND_LINE_ARGUMENT_
|
||||
WINPR_ASSERT(settings);
|
||||
WINPR_ASSERT(arg);
|
||||
|
||||
size_t count = 0, x;
|
||||
size_t count = 0;
|
||||
size_t x;
|
||||
char** ptr = CommandLineParseCommaSeparatedValues(arg->Value, &count);
|
||||
if (count == 0)
|
||||
return COMMAND_LINE_ERROR_UNEXPECTED_VALUE;
|
||||
@ -3224,7 +3232,8 @@ static int parse_cert_options(rdpSettings* settings, const COMMAND_LINE_ARGUMENT
|
||||
char** p;
|
||||
const char** pc;
|
||||
} ptr;
|
||||
size_t count, x;
|
||||
size_t count;
|
||||
size_t x;
|
||||
ptr.p = CommandLineParseCommaSeparatedValues(arg->Value, &count);
|
||||
for (x = 0; (x < count) && (rc == 0); x++)
|
||||
{
|
||||
@ -3521,7 +3530,8 @@ static int parse_tune_options(rdpSettings* settings, const COMMAND_LINE_ARGUMENT
|
||||
WINPR_ASSERT(settings);
|
||||
WINPR_ASSERT(arg);
|
||||
|
||||
size_t x, count;
|
||||
size_t x;
|
||||
size_t count;
|
||||
union
|
||||
{
|
||||
char** p;
|
||||
@ -4558,7 +4568,8 @@ static int freerdp_client_settings_parse_command_line_arguments_int(
|
||||
}
|
||||
CommandLineSwitchCase(arg, "window-position")
|
||||
{
|
||||
unsigned long x, y;
|
||||
unsigned long x;
|
||||
unsigned long y;
|
||||
|
||||
if (!arg->Value)
|
||||
return COMMAND_LINE_ERROR_MISSING_ARGUMENT;
|
||||
|
@ -884,9 +884,11 @@ BOOL freerdp_client_parse_rdp_file_buffer_ex(rdpFile* file, const BYTE* buffer,
|
||||
char* line;
|
||||
char* type;
|
||||
char* context;
|
||||
char *d1, *d2;
|
||||
char* d1;
|
||||
char* d2;
|
||||
char* beg;
|
||||
char *name, *value;
|
||||
char* name;
|
||||
char* value;
|
||||
char* copy = NULL;
|
||||
|
||||
if (!file)
|
||||
@ -1316,7 +1318,8 @@ BOOL freerdp_client_populate_rdp_file_from_settings(rdpFile* file, const rdpSett
|
||||
|
||||
{
|
||||
size_t offset = 0;
|
||||
UINT32 x, count = freerdp_settings_get_uint32(settings, FreeRDP_NumMonitorIds);
|
||||
UINT32 x;
|
||||
UINT32 count = freerdp_settings_get_uint32(settings, FreeRDP_NumMonitorIds);
|
||||
const UINT32* MonitorIds = freerdp_settings_get_pointer(settings, FreeRDP_MonitorIds);
|
||||
/* String size: 10 char UINT32 max string length, 1 char separator, one element NULL */
|
||||
size_t size = count * (10 + 1) + 1;
|
||||
@ -1622,7 +1625,8 @@ size_t freerdp_client_write_rdp_file_buffer(const rdpFile* file, char* buffer, s
|
||||
|
||||
static ADDIN_ARGV* rdp_file_to_args(const char* channel, const char* values)
|
||||
{
|
||||
size_t count, x;
|
||||
size_t count;
|
||||
size_t x;
|
||||
char** p = NULL;
|
||||
ADDIN_ARGV* args = freerdp_addin_argv_new(0, NULL);
|
||||
if (!args)
|
||||
@ -2419,7 +2423,8 @@ BOOL freerdp_client_populate_settings_from_rdp_file(const rdpFile* file, rdpSett
|
||||
|
||||
if (~(size_t)file->SelectedMonitors)
|
||||
{
|
||||
size_t count = 0, x;
|
||||
size_t count = 0;
|
||||
size_t x;
|
||||
char** args = CommandLineParseCommaSeparatedValues(file->SelectedMonitors, &count);
|
||||
UINT32* list;
|
||||
|
||||
|
41
libfreerdp/cache/glyph.c
vendored
41
libfreerdp/cache/glyph.c
vendored
@ -75,8 +75,10 @@ static BOOL update_process_glyph(rdpContext* context, const BYTE* data, UINT32 c
|
||||
INT32* y, UINT32 cacheId, UINT32 flAccel, BOOL fOpRedundant,
|
||||
const RDP_RECT* bound)
|
||||
{
|
||||
INT32 sx = 0, sy = 0;
|
||||
INT32 dx, dy;
|
||||
INT32 sx = 0;
|
||||
INT32 sy = 0;
|
||||
INT32 dx;
|
||||
INT32 dy;
|
||||
rdpGlyph* glyph;
|
||||
rdpGlyphCache* glyph_cache;
|
||||
|
||||
@ -286,7 +288,10 @@ static BOOL update_process_glyph_fragments(rdpContext* context, const BYTE* data
|
||||
|
||||
static BOOL update_gdi_glyph_index(rdpContext* context, GLYPH_INDEX_ORDER* glyphIndex)
|
||||
{
|
||||
INT32 bkWidth = 0, bkHeight = 0, opWidth = 0, opHeight = 0;
|
||||
INT32 bkWidth = 0;
|
||||
INT32 bkHeight = 0;
|
||||
INT32 opWidth = 0;
|
||||
INT32 opHeight = 0;
|
||||
|
||||
if (!context || !glyphIndex || !context->cache)
|
||||
return FALSE;
|
||||
@ -312,11 +317,16 @@ static BOOL update_gdi_glyph_index(rdpContext* context, GLYPH_INDEX_ORDER* glyph
|
||||
|
||||
static BOOL update_gdi_fast_index(rdpContext* context, const FAST_INDEX_ORDER* fastIndex)
|
||||
{
|
||||
INT32 x, y;
|
||||
INT32 opLeft, opTop;
|
||||
INT32 opRight, opBottom;
|
||||
INT32 opWidth = 0, opHeight = 0;
|
||||
INT32 bkWidth = 0, bkHeight = 0;
|
||||
INT32 x;
|
||||
INT32 y;
|
||||
INT32 opLeft;
|
||||
INT32 opTop;
|
||||
INT32 opRight;
|
||||
INT32 opBottom;
|
||||
INT32 opWidth = 0;
|
||||
INT32 opHeight = 0;
|
||||
INT32 bkWidth = 0;
|
||||
INT32 bkHeight = 0;
|
||||
|
||||
if (!context || !fastIndex || !context->cache)
|
||||
return FALSE;
|
||||
@ -383,12 +393,17 @@ static BOOL update_gdi_fast_index(rdpContext* context, const FAST_INDEX_ORDER* f
|
||||
|
||||
static BOOL update_gdi_fast_glyph(rdpContext* context, const FAST_GLYPH_ORDER* fastGlyph)
|
||||
{
|
||||
INT32 x, y;
|
||||
INT32 x;
|
||||
INT32 y;
|
||||
BYTE text_data[4] = { 0 };
|
||||
INT32 opLeft, opTop;
|
||||
INT32 opRight, opBottom;
|
||||
INT32 opWidth = 0, opHeight = 0;
|
||||
INT32 bkWidth = 0, bkHeight = 0;
|
||||
INT32 opLeft;
|
||||
INT32 opTop;
|
||||
INT32 opRight;
|
||||
INT32 opBottom;
|
||||
INT32 opWidth = 0;
|
||||
INT32 opHeight = 0;
|
||||
INT32 bkWidth = 0;
|
||||
INT32 bkHeight = 0;
|
||||
rdpCache* cache;
|
||||
|
||||
if (!context || !fastGlyph || !context->cache)
|
||||
|
@ -149,7 +149,8 @@ static BOOL clear_decompress_subcode_rlex(wStream* s, UINT32 bitmapDataByteCount
|
||||
UINT32 nDstStep, UINT32 nXDstRel, UINT32 nYDstRel,
|
||||
UINT32 nDstWidth, UINT32 nDstHeight)
|
||||
{
|
||||
UINT32 x = 0, y = 0;
|
||||
UINT32 x = 0;
|
||||
UINT32 y = 0;
|
||||
UINT32 i;
|
||||
UINT32 pixelCount;
|
||||
UINT32 bitmapDataOffset;
|
||||
@ -181,7 +182,9 @@ static BOOL clear_decompress_subcode_rlex(wStream* s, UINT32 bitmapDataByteCount
|
||||
|
||||
for (i = 0; i < paletteCount; i++)
|
||||
{
|
||||
BYTE r, g, b;
|
||||
BYTE r;
|
||||
BYTE g;
|
||||
BYTE b;
|
||||
Stream_Read_UINT8(s, b);
|
||||
Stream_Read_UINT8(s, g);
|
||||
Stream_Read_UINT8(s, r);
|
||||
@ -374,7 +377,9 @@ static BOOL clear_decompress_residual_data(CLEAR_CONTEXT* clear, wStream* s,
|
||||
|
||||
while (suboffset < residualByteCount)
|
||||
{
|
||||
BYTE r, g, b;
|
||||
BYTE r;
|
||||
BYTE g;
|
||||
BYTE b;
|
||||
UINT32 runLengthFactor;
|
||||
UINT32 color;
|
||||
|
||||
@ -587,7 +592,9 @@ static BOOL clear_decompress_bands_data(CLEAR_CONTEXT* clear, wStream* s, UINT32
|
||||
|
||||
while (suboffset < bandsByteCount)
|
||||
{
|
||||
BYTE cr, cg, cb;
|
||||
BYTE cr;
|
||||
BYTE cg;
|
||||
BYTE cb;
|
||||
UINT16 xStart;
|
||||
UINT16 xEnd;
|
||||
UINT16 yStart;
|
||||
@ -706,7 +713,9 @@ static BOOL clear_decompress_bands_data(CLEAR_CONTEXT* clear, wStream* s, UINT32
|
||||
|
||||
for (UINT32 y = 0; y < vBarShortPixelCount; y++)
|
||||
{
|
||||
BYTE r = 0, g = 0, b = 0;
|
||||
BYTE r = 0;
|
||||
BYTE g = 0;
|
||||
BYTE b = 0;
|
||||
BYTE* dstBuffer =
|
||||
&vBarShortEntry->pixels[y * FreeRDPGetBytesPerPixel(clear->format)];
|
||||
UINT32 color = 0;
|
||||
|
@ -43,7 +43,8 @@
|
||||
|
||||
BYTE* freerdp_glyph_convert(UINT32 width, UINT32 height, const BYTE* data)
|
||||
{
|
||||
UINT32 x, y;
|
||||
UINT32 x;
|
||||
UINT32 y;
|
||||
const BYTE* srcp;
|
||||
BYTE* dstp;
|
||||
BYTE* dstData;
|
||||
@ -87,7 +88,8 @@ BOOL freerdp_image_copy_from_monochrome(BYTE* WINPR_RESTRICT pDstData, UINT32 Ds
|
||||
UINT32 backColor, UINT32 foreColor,
|
||||
const gdiPalette* WINPR_RESTRICT palette)
|
||||
{
|
||||
UINT32 x, y;
|
||||
UINT32 x;
|
||||
UINT32 y;
|
||||
BOOL vFlip;
|
||||
UINT32 monoStep;
|
||||
const UINT32 dstBytesPerPixel = FreeRDPGetBytesPerPixel(DstFormat);
|
||||
@ -258,9 +260,12 @@ BOOL freerdp_image_copy_from_icon_data(BYTE* WINPR_RESTRICT pDstData, UINT32 Dst
|
||||
{
|
||||
BYTE nextBit;
|
||||
const BYTE* maskByte;
|
||||
UINT32 x, y;
|
||||
UINT32 x;
|
||||
UINT32 y;
|
||||
UINT32 stride;
|
||||
BYTE r, g, b;
|
||||
BYTE r;
|
||||
BYTE g;
|
||||
BYTE b;
|
||||
BYTE* dstBuf = pDstData;
|
||||
UINT32 dstBpp = FreeRDPGetBytesPerPixel(DstFormat);
|
||||
|
||||
@ -306,7 +311,8 @@ static BOOL freerdp_image_copy_from_pointer_data_1bpp(
|
||||
UINT32 nWidth, UINT32 nHeight, const BYTE* WINPR_RESTRICT xorMask, UINT32 xorMaskLength,
|
||||
const BYTE* WINPR_RESTRICT andMask, UINT32 andMaskLength, UINT32 xorBpp)
|
||||
{
|
||||
UINT32 x, y;
|
||||
UINT32 x;
|
||||
UINT32 y;
|
||||
BOOL vFlip;
|
||||
UINT32 xorStep;
|
||||
UINT32 andStep;
|
||||
@ -394,7 +400,8 @@ static BOOL freerdp_image_copy_from_pointer_data_xbpp(
|
||||
const BYTE* WINPR_RESTRICT andMask, UINT32 andMaskLength, UINT32 xorBpp,
|
||||
const gdiPalette* palette)
|
||||
{
|
||||
UINT32 x, y;
|
||||
UINT32 x;
|
||||
UINT32 y;
|
||||
BOOL vFlip;
|
||||
UINT32 xorStep;
|
||||
UINT32 andStep;
|
||||
|
@ -500,7 +500,8 @@ static BOOL ffmpeg_encode_frame(AVCodecContext* context, AVFrame* in, AVPacket*
|
||||
static BOOL ffmpeg_fill_frame(AVFrame* frame, const AUDIO_FORMAT* inputFormat, const BYTE* data,
|
||||
size_t size)
|
||||
{
|
||||
int ret, bpp;
|
||||
int ret;
|
||||
int bpp;
|
||||
#if LIBAVUTIL_VERSION_INT < AV_VERSION_INT(57, 28, 100)
|
||||
frame->channels = inputFormat->nChannels;
|
||||
frame->channel_layout = av_get_default_channel_layout(frame->channels);
|
||||
@ -674,7 +675,8 @@ static BOOL freerdp_dsp_channel_mix(FREERDP_DSP_CONTEXT* context, const BYTE* sr
|
||||
{
|
||||
UINT32 bpp;
|
||||
size_t samples;
|
||||
size_t x, y;
|
||||
size_t x;
|
||||
size_t y;
|
||||
|
||||
if (!context || !data || !length || !dstFormat)
|
||||
return FALSE;
|
||||
|
@ -155,7 +155,8 @@ static BOOL allocate_h264_metablock(UINT32 QP, RECTANGLE_16* rectangles,
|
||||
static INLINE BOOL diff_tile(const RECTANGLE_16* regionRect, BYTE* pYUVData[3],
|
||||
BYTE* pOldYUVData[3], UINT32 const iStride[3])
|
||||
{
|
||||
size_t size, y;
|
||||
size_t size;
|
||||
size_t y;
|
||||
if (!regionRect || !pYUVData || !pOldYUVData || !iStride)
|
||||
return FALSE;
|
||||
size = regionRect->right - regionRect->left;
|
||||
@ -189,7 +190,9 @@ static BOOL detect_changes(BOOL firstFrameDone, const UINT32 QP, const RECTANGLE
|
||||
BYTE* pYUVData[3], BYTE* pOldYUVData[3], UINT32 const iStride[3],
|
||||
RDPGFX_H264_METABLOCK* meta)
|
||||
{
|
||||
size_t count = 0, wc, hc;
|
||||
size_t count = 0;
|
||||
size_t wc;
|
||||
size_t hc;
|
||||
RECTANGLE_16* rectangles;
|
||||
|
||||
if (!regionRect || !pYUVData || !pOldYUVData || !iStride || !meta)
|
||||
@ -207,7 +210,8 @@ static BOOL detect_changes(BOOL firstFrameDone, const UINT32 QP, const RECTANGLE
|
||||
}
|
||||
else
|
||||
{
|
||||
size_t x, y;
|
||||
size_t x;
|
||||
size_t y;
|
||||
for (y = regionRect->top; y < regionRect->bottom; y += 64)
|
||||
{
|
||||
for (x = regionRect->left; x < regionRect->right; x += 64)
|
||||
|
@ -182,7 +182,8 @@ static int openh264_decompress(H264_CONTEXT* h264, const BYTE* pSrcData, UINT32
|
||||
static int openh264_compress(H264_CONTEXT* h264, const BYTE** pYUVData, const UINT32* iStride,
|
||||
BYTE** ppDstData, UINT32* pDstSize)
|
||||
{
|
||||
int i, j;
|
||||
int i;
|
||||
int j;
|
||||
int status;
|
||||
SFrameBSInfo info = { 0 };
|
||||
SSourcePicture pic = { 0 };
|
||||
|
@ -450,7 +450,9 @@ int mppc_compress(MPPC_CONTEXT* mppc, const BYTE* pSrcData, UINT32 SrcSize, BYTE
|
||||
BYTE* HistoryPtr;
|
||||
UINT32 HistoryOffset;
|
||||
UINT32 HistoryBufferSize;
|
||||
BYTE Sym1, Sym2, Sym3;
|
||||
BYTE Sym1;
|
||||
BYTE Sym2;
|
||||
BYTE Sym3;
|
||||
UINT32 CompressionLevel;
|
||||
wBitStream* bs;
|
||||
|
||||
|
@ -2337,7 +2337,8 @@ static int ncrush_hash_table_add(NCRUSH_CONTEXT* ncrush, const BYTE* pSrcData, U
|
||||
|
||||
static int ncrush_find_match_length(const BYTE* Ptr1, const BYTE* Ptr2, BYTE* HistoryPtr)
|
||||
{
|
||||
BYTE val1, val2;
|
||||
BYTE val1;
|
||||
BYTE val2;
|
||||
const BYTE* Ptr = Ptr1;
|
||||
|
||||
WINPR_ASSERT(Ptr1);
|
||||
@ -2362,7 +2363,8 @@ static int ncrush_find_match_length(const BYTE* Ptr1, const BYTE* Ptr2, BYTE* Hi
|
||||
static int ncrush_find_best_match(NCRUSH_CONTEXT* ncrush, UINT16 HistoryOffset,
|
||||
UINT32* pMatchOffset)
|
||||
{
|
||||
int i, j;
|
||||
int i;
|
||||
int j;
|
||||
int Length;
|
||||
int MatchLength;
|
||||
BYTE* MatchPtr;
|
||||
@ -2480,7 +2482,8 @@ static int ncrush_find_best_match(NCRUSH_CONTEXT* ncrush, UINT16 HistoryOffset,
|
||||
|
||||
static int ncrush_move_encoder_windows(NCRUSH_CONTEXT* ncrush, BYTE* HistoryPtr)
|
||||
{
|
||||
int i, j;
|
||||
int i;
|
||||
int j;
|
||||
int NewHash;
|
||||
int NewMatch;
|
||||
UINT32 HistoryOffset;
|
||||
@ -2939,8 +2942,10 @@ int ncrush_compress(NCRUSH_CONTEXT* ncrush, const BYTE* pSrcData, UINT32 SrcSize
|
||||
|
||||
static int ncrush_generate_tables(NCRUSH_CONTEXT* context)
|
||||
{
|
||||
UINT32 k, i;
|
||||
int j, l;
|
||||
UINT32 k;
|
||||
UINT32 i;
|
||||
int j;
|
||||
int l;
|
||||
k = 0;
|
||||
|
||||
WINPR_ASSERT(context);
|
||||
|
@ -167,7 +167,8 @@ static INLINE INT32 planar_skip_plane_rle(const BYTE* pSrcData, UINT32 SrcSize,
|
||||
UINT32 nHeight)
|
||||
{
|
||||
UINT32 used = 0;
|
||||
UINT32 x, y;
|
||||
UINT32 x;
|
||||
UINT32 y;
|
||||
BYTE controlByte;
|
||||
|
||||
WINPR_ASSERT(pSrcData);
|
||||
@ -231,7 +232,8 @@ static INLINE INT32 planar_skip_plane_rle(const BYTE* pSrcData, UINT32 SrcSize,
|
||||
static INLINE INT32 planar_decompress_plane_rle_only(const BYTE* pSrcData, UINT32 SrcSize,
|
||||
BYTE* pDstData, UINT32 nWidth, UINT32 nHeight)
|
||||
{
|
||||
INT32 x, y;
|
||||
INT32 x;
|
||||
INT32 y;
|
||||
UINT32 pixel;
|
||||
UINT32 cRawBytes;
|
||||
UINT32 nRunLength;
|
||||
@ -353,12 +355,15 @@ static INLINE INT32 planar_decompress_plane_rle(const BYTE* pSrcData, UINT32 Src
|
||||
UINT32 nYDst, UINT32 nWidth, UINT32 nHeight,
|
||||
UINT32 nChannel, BOOL vFlip)
|
||||
{
|
||||
INT32 x, y;
|
||||
INT32 x;
|
||||
INT32 y;
|
||||
UINT32 pixel;
|
||||
UINT32 cRawBytes;
|
||||
UINT32 nRunLength;
|
||||
INT32 deltaValue;
|
||||
INT32 beg, end, inc;
|
||||
INT32 beg;
|
||||
INT32 end;
|
||||
INT32 inc;
|
||||
BYTE controlByte;
|
||||
BYTE* currentScanline;
|
||||
BYTE* previousScanline;
|
||||
@ -489,8 +494,11 @@ static INLINE INT32 planar_set_plane(BYTE bValue, BYTE* pDstData, INT32 nDstStep
|
||||
UINT32 nYDst, UINT32 nWidth, UINT32 nHeight, UINT32 nChannel,
|
||||
BOOL vFlip)
|
||||
{
|
||||
INT32 x, y;
|
||||
INT32 beg, end, inc;
|
||||
INT32 x;
|
||||
INT32 y;
|
||||
INT32 beg;
|
||||
INT32 end;
|
||||
INT32 inc;
|
||||
|
||||
WINPR_ASSERT(nHeight <= INT32_MAX);
|
||||
WINPR_ASSERT(nWidth <= INT32_MAX);
|
||||
@ -592,7 +600,9 @@ static INLINE BOOL planar_decompress_planes_raw(const BYTE* pSrcData[4], BYTE* p
|
||||
BOOL vFlip, UINT32 totalHeight)
|
||||
{
|
||||
INT32 y;
|
||||
INT32 beg, end, inc;
|
||||
INT32 beg;
|
||||
INT32 end;
|
||||
INT32 inc;
|
||||
const BYTE* pR = pSrcData[0];
|
||||
const BYTE* pG = pSrcData[1];
|
||||
const BYTE* pB = pSrcData[2];
|
||||
@ -1095,7 +1105,9 @@ static INLINE BOOL freerdp_split_color_planes(BITMAP_PLANAR_CONTEXT* planar, con
|
||||
|
||||
if (planar->topdown)
|
||||
{
|
||||
UINT32 i, j, k = 0;
|
||||
UINT32 i;
|
||||
UINT32 j;
|
||||
UINT32 k = 0;
|
||||
for (i = 0; i < height; i++)
|
||||
{
|
||||
const BYTE* pixel = &data[scanline * (UINT32)i];
|
||||
@ -1113,7 +1125,8 @@ static INLINE BOOL freerdp_split_color_planes(BITMAP_PLANAR_CONTEXT* planar, con
|
||||
else
|
||||
{
|
||||
INT64 i;
|
||||
UINT32 j, k = 0;
|
||||
UINT32 j;
|
||||
UINT32 k = 0;
|
||||
|
||||
for (i = (INT64)height - 1; i >= 0; i--)
|
||||
{
|
||||
@ -1421,9 +1434,11 @@ BYTE* freerdp_bitmap_planar_delta_encode_plane(const BYTE* inPlane, UINT32 width
|
||||
BYTE* outPlane)
|
||||
{
|
||||
char s2c;
|
||||
UINT32 y, x;
|
||||
UINT32 y;
|
||||
UINT32 x;
|
||||
BYTE* outPtr;
|
||||
const BYTE *srcPtr, *prevLinePtr;
|
||||
const BYTE* srcPtr;
|
||||
const BYTE* prevLinePtr;
|
||||
|
||||
if (!outPlane)
|
||||
{
|
||||
|
@ -605,8 +605,11 @@ static INLINE void progressive_rfx_idwt_x(const INT16* pLowBand, size_t nLowStep
|
||||
{
|
||||
size_t i;
|
||||
INT16 L0;
|
||||
INT16 H0, H1;
|
||||
INT16 X0, X1, X2;
|
||||
INT16 H0;
|
||||
INT16 H1;
|
||||
INT16 X0;
|
||||
INT16 X1;
|
||||
INT16 X2;
|
||||
|
||||
for (i = 0; i < nDstCount; i++)
|
||||
{
|
||||
@ -677,8 +680,11 @@ static INLINE void progressive_rfx_idwt_y(const INT16* pLowBand, size_t nLowStep
|
||||
{
|
||||
size_t i;
|
||||
INT16 L0;
|
||||
INT16 H0, H1;
|
||||
INT16 X0, X1, X2;
|
||||
INT16 H0;
|
||||
INT16 H1;
|
||||
INT16 X0;
|
||||
INT16 X1;
|
||||
INT16 X2;
|
||||
|
||||
for (i = 0; i < nDstCount; i++)
|
||||
{
|
||||
@ -766,9 +772,13 @@ static INLINE void progressive_rfx_dwt_2d_decode_block(INT16* buffer, INT16* tem
|
||||
{
|
||||
size_t nDstStepX;
|
||||
size_t nDstStepY;
|
||||
INT16 *HL, *LH;
|
||||
INT16 *HH, *LL;
|
||||
INT16 *L, *H, *LLx;
|
||||
INT16* HL;
|
||||
INT16* LH;
|
||||
INT16* HH;
|
||||
INT16* LL;
|
||||
INT16* L;
|
||||
INT16* H;
|
||||
INT16* LLx;
|
||||
|
||||
const size_t nBandL = progressive_rfx_get_band_l_count(level);
|
||||
const size_t nBandH = progressive_rfx_get_band_h_count(level);
|
||||
@ -913,7 +923,9 @@ static INLINE int progressive_decompress_tile_first(PROGRESSIVE_CONTEXT* progres
|
||||
const PROGRESSIVE_BLOCK_CONTEXT* context)
|
||||
{
|
||||
int rc;
|
||||
BOOL diff, sub, extrapolate;
|
||||
BOOL diff;
|
||||
BOOL sub;
|
||||
BOOL extrapolate;
|
||||
BYTE* pBuffer;
|
||||
INT16* pSign[3];
|
||||
INT16* pSrcDst[3];
|
||||
@ -1315,7 +1327,9 @@ static INLINE int progressive_decompress_tile_upgrade(PROGRESSIVE_CONTEXT* progr
|
||||
const PROGRESSIVE_BLOCK_CONTEXT* context)
|
||||
{
|
||||
int status;
|
||||
BOOL coeffDiff, sub, extrapolate;
|
||||
BOOL coeffDiff;
|
||||
BOOL sub;
|
||||
BOOL extrapolate;
|
||||
BYTE* pBuffer;
|
||||
INT16* pSign[3] = { 0 };
|
||||
INT16* pSrcDst[3] = { 0 };
|
||||
@ -2455,8 +2469,10 @@ int progressive_compress(PROGRESSIVE_CONTEXT* progressive, const BYTE* pSrcData,
|
||||
BOOL rc = FALSE;
|
||||
int res = -6;
|
||||
wStream* s = NULL;
|
||||
UINT32 i = 0, numRects = 0;
|
||||
UINT32 x = 0, y = 0;
|
||||
UINT32 i = 0;
|
||||
UINT32 numRects = 0;
|
||||
UINT32 x = 0;
|
||||
UINT32 y = 0;
|
||||
RFX_RECT* rects = NULL;
|
||||
RFX_MESSAGE* message = NULL;
|
||||
|
||||
|
@ -234,7 +234,8 @@ BOOL region16_copy(REGION16* dst, const REGION16* src)
|
||||
void region16_print(const REGION16* region)
|
||||
{
|
||||
const RECTANGLE_16* rects;
|
||||
UINT32 nbRects, i;
|
||||
UINT32 nbRects;
|
||||
UINT32 i;
|
||||
int currentBandY = -1;
|
||||
rects = region16_rects(region, &nbRects);
|
||||
WLog_DBG(TAG, "nrects=%" PRIu32 "", nbRects);
|
||||
@ -258,7 +259,8 @@ static void region16_copy_band_with_union(RECTANGLE_16* dst, const RECTANGLE_16*
|
||||
const RECTANGLE_16** srcPtr, RECTANGLE_16** dstPtr)
|
||||
{
|
||||
UINT16 refY = src->top;
|
||||
const RECTANGLE_16 *startOverlap, *endOverlap;
|
||||
const RECTANGLE_16* startOverlap;
|
||||
const RECTANGLE_16* endOverlap;
|
||||
|
||||
/* merges a band with the given rect
|
||||
* Input:
|
||||
@ -419,8 +421,10 @@ static BOOL region16_simplify_bands(REGION16* region)
|
||||
*
|
||||
*/
|
||||
RECTANGLE_16* endBand;
|
||||
int nbRects, finalNbRects;
|
||||
int bandItems, toMove;
|
||||
int nbRects;
|
||||
int finalNbRects;
|
||||
int bandItems;
|
||||
int toMove;
|
||||
finalNbRects = nbRects = region16_n_rects(region);
|
||||
|
||||
if (nbRects < 2)
|
||||
@ -489,11 +493,14 @@ BOOL region16_union_rect(REGION16* dst, const REGION16* src, const RECTANGLE_16*
|
||||
{
|
||||
const RECTANGLE_16* srcExtents;
|
||||
RECTANGLE_16* dstExtents;
|
||||
const RECTANGLE_16 *currentBand, *endSrcRect, *nextBand;
|
||||
const RECTANGLE_16* currentBand;
|
||||
const RECTANGLE_16* endSrcRect;
|
||||
const RECTANGLE_16* nextBand;
|
||||
REGION16_DATA* newItems = NULL;
|
||||
REGION16_DATA* tmpItems = NULL;
|
||||
RECTANGLE_16* dstRect = NULL;
|
||||
UINT32 usedRects, srcNbRects;
|
||||
UINT32 usedRects;
|
||||
UINT32 srcNbRects;
|
||||
UINT16 topInterBand;
|
||||
WINPR_ASSERT(src);
|
||||
WINPR_ASSERT(dst);
|
||||
@ -680,7 +687,9 @@ BOOL region16_union_rect(REGION16* dst, const REGION16* src, const RECTANGLE_16*
|
||||
|
||||
BOOL region16_intersects_rect(const REGION16* src, const RECTANGLE_16* arg2)
|
||||
{
|
||||
const RECTANGLE_16 *rect, *endPtr, *srcExtents;
|
||||
const RECTANGLE_16* rect;
|
||||
const RECTANGLE_16* endPtr;
|
||||
const RECTANGLE_16* srcExtents;
|
||||
UINT32 nbRects;
|
||||
|
||||
if (!src || !src->data || !arg2)
|
||||
@ -711,10 +720,14 @@ BOOL region16_intersects_rect(const REGION16* src, const RECTANGLE_16* arg2)
|
||||
BOOL region16_intersect_rect(REGION16* dst, const REGION16* src, const RECTANGLE_16* rect)
|
||||
{
|
||||
REGION16_DATA* newItems;
|
||||
const RECTANGLE_16 *srcPtr, *endPtr, *srcExtents;
|
||||
const RECTANGLE_16* srcPtr;
|
||||
const RECTANGLE_16* endPtr;
|
||||
const RECTANGLE_16* srcExtents;
|
||||
RECTANGLE_16* dstPtr;
|
||||
UINT32 nbRects, usedRects;
|
||||
RECTANGLE_16 common, newExtents;
|
||||
UINT32 nbRects;
|
||||
UINT32 usedRects;
|
||||
RECTANGLE_16 common;
|
||||
RECTANGLE_16 newExtents;
|
||||
WINPR_ASSERT(src);
|
||||
WINPR_ASSERT(src->data);
|
||||
srcPtr = region16_rects(src, &nbRects);
|
||||
|
@ -828,7 +828,8 @@ static BOOL rfx_process_message_tileset(RFX_CONTEXT* context, RFX_MESSAGE* messa
|
||||
BYTE quant;
|
||||
RFX_TILE* tile;
|
||||
UINT32* quants;
|
||||
UINT16 subtype, numTiles;
|
||||
UINT16 subtype;
|
||||
UINT16 numTiles;
|
||||
UINT32 blockLen;
|
||||
UINT32 blockType;
|
||||
UINT32 tilesDataSize;
|
||||
@ -1623,7 +1624,8 @@ RFX_MESSAGE* rfx_encode_message(RFX_CONTEXT* context, const RFX_RECT* rects, siz
|
||||
PTP_WORK* workObject = NULL;
|
||||
RFX_TILE_COMPOSE_WORK_PARAM* workParam = NULL;
|
||||
BOOL success = FALSE;
|
||||
REGION16 rectsRegion = { 0 }, tilesRegion = { 0 };
|
||||
REGION16 rectsRegion = { 0 };
|
||||
REGION16 tilesRegion = { 0 };
|
||||
RECTANGLE_16 currentTileRect = { 0 };
|
||||
const RECTANGLE_16* regionRect = NULL;
|
||||
|
||||
|
@ -72,7 +72,9 @@ BOOL rfx_decode_rgb(RFX_CONTEXT* context, const RFX_TILE* tile, BYTE* rgb_buffer
|
||||
BOOL rc = TRUE;
|
||||
BYTE* pBuffer;
|
||||
INT16* pSrcDst[3];
|
||||
UINT32 *y_quants, *cb_quants, *cr_quants;
|
||||
UINT32* y_quants;
|
||||
UINT32* cb_quants;
|
||||
UINT32* cr_quants;
|
||||
static const prim_size_t roi_64x64 = { 64, 64 };
|
||||
const primitives_t* prims = primitives_get();
|
||||
PROFILER_ENTER(context->priv->prof_rfx_decode_rgb)
|
||||
|
@ -27,9 +27,15 @@
|
||||
|
||||
static void rfx_dwt_2d_decode_block(INT16* buffer, INT16* idwt, size_t subband_width)
|
||||
{
|
||||
INT16 *dst, *l, *h;
|
||||
INT16 *l_dst, *h_dst;
|
||||
INT16 *hl, *lh, *hh, *ll;
|
||||
INT16* dst;
|
||||
INT16* l;
|
||||
INT16* h;
|
||||
INT16* l_dst;
|
||||
INT16* h_dst;
|
||||
INT16* hl;
|
||||
INT16* lh;
|
||||
INT16* hh;
|
||||
INT16* ll;
|
||||
|
||||
const size_t total_width = subband_width << 1;
|
||||
|
||||
@ -120,9 +126,15 @@ void rfx_dwt_2d_decode(INT16* buffer, INT16* dwt_buffer)
|
||||
|
||||
static void rfx_dwt_2d_encode_block(INT16* buffer, INT16* dwt, UINT32 subband_width)
|
||||
{
|
||||
INT16 *src, *l, *h;
|
||||
INT16 *l_src, *h_src;
|
||||
INT16 *hl, *lh, *hh, *ll;
|
||||
INT16* src;
|
||||
INT16* l;
|
||||
INT16* h;
|
||||
INT16* l_src;
|
||||
INT16* h_src;
|
||||
INT16* hl;
|
||||
INT16* lh;
|
||||
INT16* hh;
|
||||
INT16* ll;
|
||||
|
||||
const UINT32 total_width = subband_width << 1;
|
||||
|
||||
|
@ -43,12 +43,19 @@ static void rfx_encode_format_rgb(const BYTE* rgb_data, int width, int height, i
|
||||
UINT32 pixel_format, const BYTE* palette, INT16* r_buf,
|
||||
INT16* g_buf, INT16* b_buf)
|
||||
{
|
||||
int x, y;
|
||||
int x;
|
||||
int y;
|
||||
int x_exceed;
|
||||
int y_exceed;
|
||||
const BYTE* src;
|
||||
INT16 r, g, b;
|
||||
INT16 *r_last, *g_last, *b_last;
|
||||
const UINT32* src_32;
|
||||
const UINT16* src_16;
|
||||
INT16 r;
|
||||
INT16 g;
|
||||
INT16 b;
|
||||
INT16* r_last;
|
||||
INT16* g_last;
|
||||
INT16* b_last;
|
||||
x_exceed = 64 - width;
|
||||
y_exceed = 64 - height;
|
||||
|
||||
@ -261,8 +268,12 @@ void rfx_encode_rgb(RFX_CONTEXT* context, RFX_TILE* tile)
|
||||
} cnv;
|
||||
BYTE* pBuffer;
|
||||
INT16* pSrcDst[3];
|
||||
int YLen, CbLen, CrLen;
|
||||
UINT32 *YQuant, *CbQuant, *CrQuant;
|
||||
int YLen;
|
||||
int CbLen;
|
||||
int CrLen;
|
||||
UINT32* YQuant;
|
||||
UINT32* CbQuant;
|
||||
UINT32* CrQuant;
|
||||
primitives_t* prims = primitives_get();
|
||||
static const prim_size_t roi_64x64 = { 64, 64 };
|
||||
|
||||
|
@ -146,7 +146,8 @@ static void rfx_quantization_encode_sse2(INT16* buffer,
|
||||
static __inline void __attribute__((ATTRIBUTES))
|
||||
rfx_dwt_2d_decode_block_horiz_sse2(INT16* l, INT16* h, INT16* dst, int subband_width)
|
||||
{
|
||||
int y, n;
|
||||
int y;
|
||||
int n;
|
||||
INT16* l_ptr = l;
|
||||
INT16* h_ptr = h;
|
||||
INT16* dst_ptr = dst;
|
||||
@ -221,7 +222,8 @@ rfx_dwt_2d_decode_block_horiz_sse2(INT16* l, INT16* h, INT16* dst, int subband_w
|
||||
static __inline void __attribute__((ATTRIBUTES))
|
||||
rfx_dwt_2d_decode_block_vert_sse2(INT16* l, INT16* h, INT16* dst, int subband_width)
|
||||
{
|
||||
int x, n;
|
||||
int x;
|
||||
int n;
|
||||
INT16* l_ptr = l;
|
||||
INT16* h_ptr = h;
|
||||
INT16* dst_ptr = dst;
|
||||
@ -299,8 +301,12 @@ rfx_dwt_2d_decode_block_vert_sse2(INT16* l, INT16* h, INT16* dst, int subband_wi
|
||||
static __inline void __attribute__((ATTRIBUTES))
|
||||
rfx_dwt_2d_decode_block_sse2(INT16* buffer, INT16* idwt, int subband_width)
|
||||
{
|
||||
INT16 *hl, *lh, *hh, *ll;
|
||||
INT16 *l_dst, *h_dst;
|
||||
INT16* hl;
|
||||
INT16* lh;
|
||||
INT16* hh;
|
||||
INT16* ll;
|
||||
INT16* l_dst;
|
||||
INT16* h_dst;
|
||||
_mm_prefetch_buffer((char*)idwt, subband_width * 4 * sizeof(INT16));
|
||||
/* Inverse DWT in horizontal direction, results in 2 sub-bands in L, H order in tmp buffer idwt.
|
||||
*/
|
||||
@ -436,8 +442,12 @@ rfx_dwt_2d_encode_block_horiz_sse2(INT16* src, INT16* l, INT16* h, int subband_w
|
||||
static __inline void __attribute__((ATTRIBUTES))
|
||||
rfx_dwt_2d_encode_block_sse2(INT16* buffer, INT16* dwt, int subband_width)
|
||||
{
|
||||
INT16 *hl, *lh, *hh, *ll;
|
||||
INT16 *l_src, *h_src;
|
||||
INT16* hl;
|
||||
INT16* lh;
|
||||
INT16* hh;
|
||||
INT16* ll;
|
||||
INT16* l_src;
|
||||
INT16* h_src;
|
||||
_mm_prefetch_buffer((char*)dwt, subband_width * 4 * sizeof(INT16));
|
||||
/* DWT in vertical direction, results in 2 sub-bands in L, H order in tmp buffer dwt. */
|
||||
l_src = dwt;
|
||||
|
@ -23,7 +23,8 @@ static BOOL run_encode_decode_single(UINT16 bpp, BITMAP_INTERLEAVED_CONTEXT* enc
|
||||
{
|
||||
BOOL rc2 = FALSE;
|
||||
BOOL rc;
|
||||
UINT32 i, j;
|
||||
UINT32 i;
|
||||
UINT32 j;
|
||||
const UINT32 w = 64;
|
||||
const UINT32 h = 64;
|
||||
const UINT32 x = 0;
|
||||
@ -69,7 +70,12 @@ static BOOL run_encode_decode_single(UINT16 bpp, BITMAP_INTERLEAVED_CONTEXT* enc
|
||||
|
||||
for (j = 0; j < w; j++)
|
||||
{
|
||||
BYTE r, g, b, dr, dg, db;
|
||||
BYTE r;
|
||||
BYTE g;
|
||||
BYTE b;
|
||||
BYTE dr;
|
||||
BYTE dg;
|
||||
BYTE db;
|
||||
const UINT32 srcColor = FreeRDPReadColor(&srcLine[j * bstep], format);
|
||||
const UINT32 dstColor = FreeRDPReadColor(&dstLine[j * bstep], format);
|
||||
FreeRDPSplitColor(srcColor, format, &r, &g, &b, NULL, NULL);
|
||||
@ -168,7 +174,10 @@ static BOOL TestColorConversion(void)
|
||||
const UINT32 colorHigh = FreeRDPGetColor(format, 255, 255, 255, 255);
|
||||
const UINT32 colorLow32 = FreeRDPConvertColor(colorLow, format, dstFormat, NULL);
|
||||
const UINT32 colorHigh32 = FreeRDPConvertColor(colorHigh, format, dstFormat, NULL);
|
||||
BYTE r, g, b, a;
|
||||
BYTE r;
|
||||
BYTE g;
|
||||
BYTE b;
|
||||
BYTE a;
|
||||
FreeRDPSplitColor(colorLow32, dstFormat, &r, &g, &b, &a, NULL);
|
||||
if ((r != 0) || (g != 0) || (b != 0))
|
||||
return FALSE;
|
||||
@ -183,7 +192,8 @@ static BOOL TestColorConversion(void)
|
||||
|
||||
int TestFreeRDPCodecInterleaved(int argc, char* argv[])
|
||||
{
|
||||
BITMAP_INTERLEAVED_CONTEXT *encoder, *decoder;
|
||||
BITMAP_INTERLEAVED_CONTEXT* encoder;
|
||||
BITMAP_INTERLEAVED_CONTEXT* decoder;
|
||||
int rc = -1;
|
||||
WINPR_UNUSED(argc);
|
||||
WINPR_UNUSED(argv);
|
||||
|
@ -5427,7 +5427,8 @@ static BOOL CompareBitmap(const BYTE* srcA, UINT32 srcAFormat, const BYTE* srcB,
|
||||
const UINT32 srcABits = FreeRDPGetBitsPerPixel(srcAFormat);
|
||||
const UINT32 srcBBits = FreeRDPGetBitsPerPixel(srcBFormat);
|
||||
UINT32 diff = fabs((double)srcABits - srcBBits);
|
||||
UINT32 x, y;
|
||||
UINT32 x;
|
||||
UINT32 y;
|
||||
|
||||
/* No support for 8bpp */
|
||||
if ((srcABits < 15) || (srcBBits < 15))
|
||||
@ -5469,7 +5470,14 @@ static BOOL CompareBitmap(const BYTE* srcA, UINT32 srcAFormat, const BYTE* srcB,
|
||||
|
||||
for (x = 0; x < width; x++)
|
||||
{
|
||||
BYTE sR, sG, sB, sA, dR, dG, dB, dA;
|
||||
BYTE sR;
|
||||
BYTE sG;
|
||||
BYTE sB;
|
||||
BYTE sA;
|
||||
BYTE dR;
|
||||
BYTE dG;
|
||||
BYTE dB;
|
||||
BYTE dA;
|
||||
const BYTE* a = &lineA[x * FreeRDPGetBytesPerPixel(srcAFormat)];
|
||||
const BYTE* b = &lineB[x * FreeRDPGetBytesPerPixel(srcBFormat)];
|
||||
UINT32 colorA = FreeRDPReadColor(a, srcAFormat);
|
||||
@ -5541,7 +5549,10 @@ fail:
|
||||
static BOOL RunTestPlanarSingleColor(BITMAP_PLANAR_CONTEXT* planar, const UINT32 srcFormat,
|
||||
const UINT32 dstFormat)
|
||||
{
|
||||
UINT32 i, j, x, y;
|
||||
UINT32 i;
|
||||
UINT32 j;
|
||||
UINT32 x;
|
||||
UINT32 y;
|
||||
BOOL rc = FALSE;
|
||||
printf("%s: [%s] --> [%s]: ", __func__, FreeRDPGetColorFormatName(srcFormat),
|
||||
FreeRDPGetColorFormatName(dstFormat));
|
||||
|
@ -151,7 +151,8 @@ static void sample_file_free(EGFX_SAMPLE_FILE* file)
|
||||
|
||||
static void test_fill_image_alpha_channel(BYTE* data, int width, int height, BYTE value)
|
||||
{
|
||||
int i, j;
|
||||
int i;
|
||||
int j;
|
||||
UINT32* pixel;
|
||||
|
||||
for (i = 0; i < height; i++)
|
||||
@ -817,7 +818,8 @@ static size_t test_memcmp_count(const BYTE* mem1, const BYTE* mem2, size_t size,
|
||||
static int test_progressive_decode(PROGRESSIVE_CONTEXT* progressive, EGFX_SAMPLE_FILE files[4],
|
||||
EGFX_SAMPLE_FILE bitmaps[4], int quarter, int count)
|
||||
{
|
||||
int nXSrc, nYSrc;
|
||||
int nXSrc;
|
||||
int nYSrc;
|
||||
|
||||
RECTANGLE_16 clippingRect = { 0 };
|
||||
clippingRect.right = g_Width;
|
||||
@ -903,7 +905,9 @@ static int test_progressive_decode(PROGRESSIVE_CONTEXT* progressive, EGFX_SAMPLE
|
||||
|
||||
static int test_progressive_ms_sample(char* ms_sample_path)
|
||||
{
|
||||
int i, j, k;
|
||||
int i;
|
||||
int j;
|
||||
int k;
|
||||
int count;
|
||||
int status;
|
||||
EGFX_SAMPLE_FILE files[3][4][4] = { 0 };
|
||||
@ -1014,8 +1018,14 @@ static BOOL diff(BYTE a, BYTE b)
|
||||
|
||||
static BOOL colordiff(UINT32 format, UINT32 a, UINT32 b)
|
||||
{
|
||||
BYTE ar, ag, ab, aa;
|
||||
BYTE br, bg, bb, ba;
|
||||
BYTE ar;
|
||||
BYTE ag;
|
||||
BYTE ab;
|
||||
BYTE aa;
|
||||
BYTE br;
|
||||
BYTE bg;
|
||||
BYTE bb;
|
||||
BYTE ba;
|
||||
FreeRDPSplitColor(a, format, &ar, &ag, &ab, &aa, NULL);
|
||||
FreeRDPSplitColor(b, format, &br, &bg, &bb, &ba, NULL);
|
||||
if (!diff(aa, ba) || !diff(ar, br) || !diff(ag, bg) || !diff(ab, bb))
|
||||
|
@ -524,7 +524,8 @@ out:
|
||||
|
||||
static int test_r1_inter_r3(void)
|
||||
{
|
||||
REGION16 region, intersection;
|
||||
REGION16 region;
|
||||
REGION16 intersection;
|
||||
int retCode = -1;
|
||||
const RECTANGLE_16* rects;
|
||||
UINT32 nbRects;
|
||||
@ -570,7 +571,8 @@ out:
|
||||
|
||||
static int test_r1_r3_inter_r11(void)
|
||||
{
|
||||
REGION16 region, intersection;
|
||||
REGION16 region;
|
||||
REGION16 intersection;
|
||||
int retCode = -1;
|
||||
const RECTANGLE_16* rects;
|
||||
UINT32 nbRects;
|
||||
@ -629,10 +631,12 @@ out:
|
||||
|
||||
static int test_norbert_case(void)
|
||||
{
|
||||
REGION16 region, intersection;
|
||||
REGION16 region;
|
||||
REGION16 intersection;
|
||||
int retCode = -1;
|
||||
const RECTANGLE_16* rects;
|
||||
UINT32 nbRects, i;
|
||||
UINT32 nbRects;
|
||||
UINT32 i;
|
||||
RECTANGLE_16 inRectangles[5] = { { 1680, 0, 1920, 242 },
|
||||
{ 294, 242, 971, 776 },
|
||||
{ 1680, 242, 1920, 776 },
|
||||
@ -770,7 +774,8 @@ out:
|
||||
|
||||
static int test_empty_rectangle(void)
|
||||
{
|
||||
REGION16 region, intersection;
|
||||
REGION16 region;
|
||||
REGION16 intersection;
|
||||
int retCode = -1;
|
||||
int i;
|
||||
RECTANGLE_16 emptyRectangles[3] = { { 0, 0, 0, 0 }, { 10, 10, 10, 11 }, { 10, 10, 11, 10 } };
|
||||
@ -840,7 +845,8 @@ static struct UnitaryTest tests[] = { { "Basic trivial tests", test_basic },
|
||||
|
||||
int TestFreeRDPRegion(int argc, char* argv[])
|
||||
{
|
||||
int i, testNb = 0;
|
||||
int i;
|
||||
int testNb = 0;
|
||||
int retCode = -1;
|
||||
WINPR_UNUSED(argc);
|
||||
WINPR_UNUSED(argv);
|
||||
|
@ -605,7 +605,8 @@ static int xcrush_find_all_matches(XCRUSH_CONTEXT* xcrush, UINT32 SignatureIndex
|
||||
|
||||
static int xcrush_optimize_matches(XCRUSH_CONTEXT* xcrush)
|
||||
{
|
||||
UINT32 i, j = 0;
|
||||
UINT32 i;
|
||||
UINT32 j = 0;
|
||||
UINT32 MatchDiff = 0;
|
||||
UINT32 PrevMatchEnd = 0;
|
||||
UINT32 TotalMatchLength = 0;
|
||||
|
@ -786,7 +786,8 @@ static BOOL pool_encode(YUV_CONTEXT* context, PTP_WORK_CALLBACK cb, const BYTE*
|
||||
{
|
||||
BOOL rc = FALSE;
|
||||
primitives_t* prims = primitives_get();
|
||||
UINT32 x, y;
|
||||
UINT32 x;
|
||||
UINT32 y;
|
||||
UINT32 waitCount = 0;
|
||||
|
||||
WINPR_ASSERT(context);
|
||||
|
@ -51,7 +51,8 @@ LPSTR freerdp_get_library_install_path(void)
|
||||
size_t cchPath;
|
||||
size_t cchLibraryPath;
|
||||
size_t cchInstallPrefix;
|
||||
BOOL needLibPath, needInstallPath;
|
||||
BOOL needLibPath;
|
||||
BOOL needInstallPath;
|
||||
LPCSTR pszLibraryPath = FREERDP_LIBRARY_PATH;
|
||||
LPCSTR pszInstallPrefix = FREERDP_INSTALL_PREFIX;
|
||||
cchLibraryPath = strlen(pszLibraryPath) + 1;
|
||||
@ -95,7 +96,8 @@ LPSTR freerdp_get_dynamic_addin_install_path(void)
|
||||
size_t cchPath;
|
||||
size_t cchAddinPath;
|
||||
size_t cchInstallPrefix;
|
||||
BOOL needLibPath, needInstallPath;
|
||||
BOOL needLibPath;
|
||||
BOOL needInstallPath;
|
||||
LPCSTR pszAddinPath = FREERDP_ADDIN_PATH;
|
||||
LPCSTR pszInstallPrefix = FREERDP_INSTALL_PREFIX;
|
||||
cchAddinPath = strlen(pszAddinPath) + 1;
|
||||
|
@ -836,7 +836,9 @@ BYTE* freerdp_assistance_encrypt_pass_stub(const char* password, const char* pas
|
||||
WINPR_CIPHER_CTX* rc4Ctx = NULL;
|
||||
BYTE* pbIn = NULL;
|
||||
BYTE* pbOut = NULL;
|
||||
size_t cbOut, cbIn, cbFinal;
|
||||
size_t cbOut;
|
||||
size_t cbIn;
|
||||
size_t cbFinal;
|
||||
WCHAR* PasswordW = ConvertUtf8ToWCharAlloc(password, &cbPasswordW);
|
||||
WCHAR* PassStubW = ConvertUtf8ToWCharAlloc(passStub, &cbPassStubW);
|
||||
|
||||
@ -907,7 +909,9 @@ static BOOL freerdp_assistance_decrypt2(rdpAssistanceFile* file)
|
||||
WCHAR* PasswordW = NULL;
|
||||
BYTE* pbIn = NULL;
|
||||
BYTE* pbOut = NULL;
|
||||
size_t cbOut, cbIn, cbFinal;
|
||||
size_t cbOut;
|
||||
size_t cbIn;
|
||||
size_t cbFinal;
|
||||
BYTE DerivedKey[WINPR_AES_BLOCK_SIZE] = { 0 };
|
||||
BYTE InitializationVector[WINPR_AES_BLOCK_SIZE] = { 0 };
|
||||
BYTE PasswordHash[WINPR_SHA1_DIGEST_LENGTH] = { 0 };
|
||||
|
@ -211,7 +211,8 @@ int freerdp_addin_replace_argument_value(ADDIN_ARGV* args, const char* previous,
|
||||
|
||||
BOOL freerdp_device_collection_add(rdpSettings* settings, RDPDR_DEVICE* device)
|
||||
{
|
||||
UINT32 count, old;
|
||||
UINT32 count;
|
||||
UINT32 old;
|
||||
WINPR_ASSERT(settings);
|
||||
WINPR_ASSERT(device);
|
||||
|
||||
@ -698,7 +699,8 @@ BOOL freerdp_dynamic_channel_collection_del(rdpSettings* settings, const char* n
|
||||
|
||||
BOOL freerdp_dynamic_channel_collection_add(rdpSettings* settings, ADDIN_ARGV* channel)
|
||||
{
|
||||
UINT32 count, oldSize;
|
||||
UINT32 count;
|
||||
UINT32 oldSize;
|
||||
|
||||
WINPR_ASSERT(settings);
|
||||
WINPR_ASSERT(channel);
|
||||
|
@ -6,7 +6,8 @@
|
||||
static BOOL test_alloc(void)
|
||||
{
|
||||
BOOL rc = FALSE;
|
||||
int rng, x;
|
||||
int rng;
|
||||
int x;
|
||||
const char* param[] = { "foo:", "bar", "bla", "rdp", NULL };
|
||||
ADDIN_ARGV* arg1 = NULL;
|
||||
ADDIN_ARGV* arg2 = NULL;
|
||||
@ -94,7 +95,8 @@ fail:
|
||||
|
||||
static BOOL test_add_remove(void)
|
||||
{
|
||||
size_t x, y;
|
||||
size_t x;
|
||||
size_t y;
|
||||
const char* args[] = { "foo", "bar", "bla", "gaga" };
|
||||
BOOL rc = FALSE;
|
||||
ADDIN_ARGV* arg = NULL;
|
||||
|
@ -675,7 +675,8 @@ BOOL generate_pop_key(rdpAad* aad)
|
||||
BOOL ret = FALSE;
|
||||
char* buffer = NULL;
|
||||
char* b64_hash = NULL;
|
||||
char *e = NULL, *n = NULL;
|
||||
char* e = NULL;
|
||||
char* n = NULL;
|
||||
|
||||
WINPR_ASSERT(aad);
|
||||
|
||||
|
@ -45,7 +45,8 @@ static BOOL rdp_write_synchronize_pdu(wStream* s, const rdpSettings* settings)
|
||||
|
||||
static BOOL rdp_recv_sync_pdu(rdpRdp* rdp, wStream* s, const char* what)
|
||||
{
|
||||
UINT16 msgType, targetUser;
|
||||
UINT16 msgType;
|
||||
UINT16 targetUser;
|
||||
|
||||
WINPR_UNUSED(rdp);
|
||||
if (!Stream_CheckAndLogRequiredLengthEx(TAG, WLOG_WARN, s, 4, 1, "%s(%s:%" PRIuz ") %s",
|
||||
@ -141,7 +142,8 @@ static BOOL rdp_write_client_control_pdu(wStream* s, UINT16 action, UINT16 grant
|
||||
|
||||
BOOL rdp_recv_server_control_pdu(rdpRdp* rdp, wStream* s)
|
||||
{
|
||||
UINT16 action, grantId;
|
||||
UINT16 action;
|
||||
UINT16 grantId;
|
||||
UINT32 controlId;
|
||||
|
||||
WINPR_ASSERT(rdp);
|
||||
@ -425,7 +427,8 @@ BOOL rdp_recv_client_persistent_key_list_pdu(wStream* s)
|
||||
BYTE flags;
|
||||
size_t count = 0;
|
||||
size_t total = 0;
|
||||
UINT16 cache, x;
|
||||
UINT16 cache;
|
||||
UINT16 x;
|
||||
|
||||
WINPR_ASSERT(s);
|
||||
|
||||
@ -515,7 +518,10 @@ BOOL rdp_send_client_font_list_pdu(rdpRdp* rdp, UINT16 flags)
|
||||
|
||||
BOOL rdp_recv_font_map_pdu(rdpRdp* rdp, wStream* s)
|
||||
{
|
||||
UINT16 numberEntries, totalNumEntries, mapFlags, entrySize;
|
||||
UINT16 numberEntries;
|
||||
UINT16 totalNumEntries;
|
||||
UINT16 mapFlags;
|
||||
UINT16 entrySize;
|
||||
|
||||
WINPR_ASSERT(rdp);
|
||||
WINPR_ASSERT(rdp->settings);
|
||||
|
@ -838,8 +838,12 @@ static BOOL rdp_write_bitmap_cache_capability_set(wStream* s, const rdpSettings*
|
||||
#ifdef WITH_DEBUG_CAPABILITIES
|
||||
static BOOL rdp_print_bitmap_cache_capability_set(wStream* s)
|
||||
{
|
||||
UINT32 pad1, pad2, pad3;
|
||||
UINT32 pad4, pad5, pad6;
|
||||
UINT32 pad1;
|
||||
UINT32 pad2;
|
||||
UINT32 pad3;
|
||||
UINT32 pad4;
|
||||
UINT32 pad5;
|
||||
UINT32 pad6;
|
||||
UINT16 Cache0Entries;
|
||||
UINT16 Cache0MaximumCellSize;
|
||||
UINT16 Cache1Entries;
|
||||
@ -4166,7 +4170,9 @@ static BOOL rdp_read_capability_sets(wStream* s, rdpSettings* settings, rdpSetti
|
||||
UINT16 totalLength)
|
||||
{
|
||||
BOOL rc = FALSE;
|
||||
size_t start, end, len;
|
||||
size_t start;
|
||||
size_t end;
|
||||
size_t len;
|
||||
UINT16 numberCapabilities;
|
||||
UINT16 count;
|
||||
|
||||
@ -4317,7 +4323,9 @@ BOOL rdp_recv_demand_active(rdpRdp* rdp, wStream* s, UINT16 pduSource, UINT16 le
|
||||
|
||||
static BOOL rdp_write_demand_active(wStream* s, rdpSettings* settings)
|
||||
{
|
||||
size_t bm, em, lm;
|
||||
size_t bm;
|
||||
size_t em;
|
||||
size_t lm;
|
||||
UINT16 numberCapabilities;
|
||||
size_t lengthCombinedCapabilities;
|
||||
|
||||
@ -4472,7 +4480,9 @@ BOOL rdp_recv_confirm_active(rdpRdp* rdp, wStream* s, UINT16 pduLength)
|
||||
|
||||
static BOOL rdp_write_confirm_active(wStream* s, rdpSettings* settings)
|
||||
{
|
||||
size_t bm, em, lm;
|
||||
size_t bm;
|
||||
size_t em;
|
||||
size_t lm;
|
||||
UINT16 numberCapabilities;
|
||||
UINT16 lengthSourceDescriptor;
|
||||
size_t lengthCombinedCapabilities;
|
||||
|
@ -1177,7 +1177,9 @@ state_run_t rdp_client_connect_license(rdpRdp* rdp, wStream* s)
|
||||
{
|
||||
state_run_t status = STATE_RUN_FAILED;
|
||||
LICENSE_STATE state;
|
||||
UINT16 length, channelId, securityFlags;
|
||||
UINT16 length;
|
||||
UINT16 channelId;
|
||||
UINT16 securityFlags;
|
||||
|
||||
WINPR_ASSERT(rdp);
|
||||
if (!rdp_read_header(rdp, s, &length, &channelId))
|
||||
|
@ -749,7 +749,8 @@ void credssp_auth_free(rdpCredsspAuth* auth)
|
||||
static void auth_get_sspi_module_from_reg(char** sspi_module)
|
||||
{
|
||||
HKEY hKey;
|
||||
DWORD dwType, dwSize;
|
||||
DWORD dwType;
|
||||
DWORD dwSize;
|
||||
|
||||
WINPR_ASSERT(sspi_module);
|
||||
*sspi_module = NULL;
|
||||
|
@ -91,7 +91,8 @@ static BOOL arm_tls_connect(rdpArm* arm, rdpTls* tls, int timeout)
|
||||
return FALSE;
|
||||
|
||||
UINT16 peerPort = (UINT16)freerdp_settings_get_uint32(settings, FreeRDP_GatewayPort);
|
||||
const char *proxyUsername, *proxyPassword;
|
||||
const char* proxyUsername;
|
||||
const char* proxyPassword;
|
||||
BOOL isProxyConnection =
|
||||
proxy_prepare(settings, &peerHostname, &peerPort, &proxyUsername, &proxyPassword);
|
||||
|
||||
|
@ -100,7 +100,8 @@ struct s_http_response
|
||||
|
||||
static char* string_strnstr(char* str1, const char* str2, size_t slen)
|
||||
{
|
||||
char c, sc;
|
||||
char c;
|
||||
char sc;
|
||||
size_t len;
|
||||
|
||||
if ((c = *str2++) != '\0')
|
||||
@ -556,7 +557,8 @@ static BOOL http_encode_print(wStream* s, WINPR_FORMAT_ARG const char* fmt, ...)
|
||||
{
|
||||
char* str;
|
||||
va_list ap;
|
||||
int length, used;
|
||||
int length;
|
||||
int used;
|
||||
|
||||
if (!s || !fmt)
|
||||
return FALSE;
|
||||
|
@ -770,8 +770,10 @@ static BOOL rdg_skip_seed_payload(rdpTls* tls, SSIZE_T lastResponseLength,
|
||||
static BOOL rdg_process_handshake_response(rdpRdg* rdg, wStream* s)
|
||||
{
|
||||
UINT32 errorCode;
|
||||
UINT16 serverVersion, extendedAuth;
|
||||
BYTE verMajor, verMinor;
|
||||
UINT16 serverVersion;
|
||||
UINT16 extendedAuth;
|
||||
BYTE verMajor;
|
||||
BYTE verMinor;
|
||||
const char* error;
|
||||
WLog_DBG(TAG, "Handshake response received");
|
||||
|
||||
@ -872,7 +874,8 @@ static BOOL rdg_process_tunnel_response_optional(rdpRdg* rdg, wStream* s, UINT16
|
||||
|
||||
static BOOL rdg_process_tunnel_response(rdpRdg* rdg, wStream* s)
|
||||
{
|
||||
UINT16 serverVersion, fieldsPresent;
|
||||
UINT16 serverVersion;
|
||||
UINT16 fieldsPresent;
|
||||
UINT32 errorCode;
|
||||
const char* error;
|
||||
WLog_DBG(TAG, "Tunnel response received");
|
||||
@ -1225,7 +1228,8 @@ static BOOL rdg_tls_connect(rdpRdg* rdg, rdpTls* tls, const char* peerAddress, i
|
||||
rdpSettings* settings = rdg->settings;
|
||||
const char* peerHostname = settings->GatewayHostname;
|
||||
UINT16 peerPort = (UINT16)settings->GatewayPort;
|
||||
const char *proxyUsername, *proxyPassword;
|
||||
const char* proxyUsername;
|
||||
const char* proxyPassword;
|
||||
BOOL isProxyConnection =
|
||||
proxy_prepare(settings, &peerHostname, &peerPort, &proxyUsername, &proxyPassword);
|
||||
|
||||
|
@ -324,7 +324,8 @@ BOOL rpc_recv_bind_ack_pdu(rdpRpc* rpc, wStream* s)
|
||||
{
|
||||
BOOL rc = FALSE;
|
||||
const BYTE* auth_data;
|
||||
size_t pos, end;
|
||||
size_t pos;
|
||||
size_t end;
|
||||
rpcconn_hdr_t header = { 0 };
|
||||
SecBuffer buffer = { 0 };
|
||||
|
||||
@ -439,7 +440,8 @@ fail:
|
||||
|
||||
enum RPC_BIND_STATE rpc_bind_state(rdpRpc* rpc)
|
||||
{
|
||||
BOOL complete, have_token;
|
||||
BOOL complete;
|
||||
BOOL have_token;
|
||||
WINPR_ASSERT(rpc);
|
||||
|
||||
complete = credssp_auth_is_complete(rpc->auth);
|
||||
|
@ -177,7 +177,8 @@ static rpcconn_rts_hdr_t rts_pdu_header_init(void)
|
||||
|
||||
static BOOL rts_align_stream(wStream* s, size_t alignment, BOOL silent)
|
||||
{
|
||||
size_t pos, pad;
|
||||
size_t pos;
|
||||
size_t pad;
|
||||
|
||||
WINPR_ASSERT(s);
|
||||
WINPR_ASSERT(alignment > 0);
|
||||
|
@ -366,7 +366,8 @@ fail:
|
||||
UINT32 rts_identify_pdu_signature(const RtsPduSignature* signature,
|
||||
const RTS_PDU_SIGNATURE_ENTRY** entry)
|
||||
{
|
||||
size_t i, j;
|
||||
size_t i;
|
||||
size_t j;
|
||||
|
||||
if (entry)
|
||||
*entry = NULL;
|
||||
|
@ -1736,7 +1736,8 @@ static BOOL TsProxyAuthorizeTunnelReadResponse(wLog* log, RPC_PDU* pdu)
|
||||
UINT32 SwitchValue;
|
||||
UINT32 index = 0;
|
||||
TSG_PACKET packet = { 0 };
|
||||
UINT32 PacketPtr = 0, PacketResponsePtr = 0;
|
||||
UINT32 PacketPtr = 0;
|
||||
UINT32 PacketResponsePtr = 0;
|
||||
if (!pdu)
|
||||
return FALSE;
|
||||
|
||||
@ -1858,7 +1859,8 @@ static BOOL TsProxyMakeTunnelCallReadResponse(rdpTsg* tsg, RPC_PDU* pdu)
|
||||
TSG_PACKET_MSG_RESPONSE packetMsgResponse = { 0 };
|
||||
TSG_PACKET_STRING_MESSAGE packetStringMessage = { 0 };
|
||||
TSG_PACKET_REAUTH_MESSAGE packetReauthMessage = { 0 };
|
||||
UINT32 PacketPtr = 0, PacketMsgResponsePtr = 0;
|
||||
UINT32 PacketPtr = 0;
|
||||
UINT32 PacketMsgResponsePtr = 0;
|
||||
|
||||
WINPR_ASSERT(tsg);
|
||||
WINPR_ASSERT(tsg->rpc);
|
||||
|
@ -218,7 +218,8 @@ static BOOL wst_tls_connect(rdpWst* wst, rdpTls* tls, int timeout)
|
||||
rdpSettings* settings = wst->settings;
|
||||
const char* peerHostname = wst->gwhostname;
|
||||
UINT16 peerPort = wst->gwport;
|
||||
const char *proxyUsername, *proxyPassword;
|
||||
const char* proxyUsername;
|
||||
const char* proxyPassword;
|
||||
BOOL isProxyConnection =
|
||||
proxy_prepare(settings, &peerHostname, &peerPort, &proxyUsername, &proxyPassword);
|
||||
|
||||
|
@ -2097,7 +2097,11 @@ BOOL gcc_read_client_monitor_data(wStream* s, rdpMcs* mcs)
|
||||
|
||||
for (index = 0; index < monitorCount; index++)
|
||||
{
|
||||
UINT32 left, top, right, bottom, flags;
|
||||
UINT32 left;
|
||||
UINT32 top;
|
||||
UINT32 right;
|
||||
UINT32 bottom;
|
||||
UINT32 flags;
|
||||
rdpMonitor* current = &settings->MonitorDefArray[index];
|
||||
|
||||
Stream_Read_UINT32(s, left); /* left */
|
||||
@ -2128,7 +2132,8 @@ BOOL gcc_write_client_monitor_data(wStream* s, const rdpMcs* mcs)
|
||||
{
|
||||
UINT32 i;
|
||||
UINT16 length;
|
||||
INT32 baseX = 0, baseY = 0;
|
||||
INT32 baseX = 0;
|
||||
INT32 baseY = 0;
|
||||
const rdpSettings* settings = mcs_get_const_settings(mcs);
|
||||
|
||||
WINPR_ASSERT(s);
|
||||
|
@ -1424,7 +1424,8 @@ static BOOL rdp_write_logon_info_v1(wStream* s, logon_info* info)
|
||||
|
||||
static BOOL rdp_write_logon_info_v2(wStream* s, logon_info* info)
|
||||
{
|
||||
size_t domainLen, usernameLen;
|
||||
size_t domainLen;
|
||||
size_t usernameLen;
|
||||
|
||||
if (!Stream_EnsureRemainingCapacity(s, logonInfoV2TotalSize))
|
||||
return FALSE;
|
||||
|
@ -644,7 +644,8 @@ static BOOL input_recv_sync_event(rdpInput* input, wStream* s)
|
||||
|
||||
static BOOL input_recv_keyboard_event(rdpInput* input, wStream* s)
|
||||
{
|
||||
UINT16 keyboardFlags, keyCode;
|
||||
UINT16 keyboardFlags;
|
||||
UINT16 keyCode;
|
||||
|
||||
WINPR_ASSERT(input);
|
||||
WINPR_ASSERT(s);
|
||||
@ -670,7 +671,8 @@ static BOOL input_recv_keyboard_event(rdpInput* input, wStream* s)
|
||||
|
||||
static BOOL input_recv_unicode_keyboard_event(rdpInput* input, wStream* s)
|
||||
{
|
||||
UINT16 keyboardFlags, unicodeCode;
|
||||
UINT16 keyboardFlags;
|
||||
UINT16 unicodeCode;
|
||||
|
||||
WINPR_ASSERT(input);
|
||||
WINPR_ASSERT(s);
|
||||
@ -692,7 +694,9 @@ static BOOL input_recv_unicode_keyboard_event(rdpInput* input, wStream* s)
|
||||
|
||||
static BOOL input_recv_mouse_event(rdpInput* input, wStream* s)
|
||||
{
|
||||
UINT16 pointerFlags, xPos, yPos;
|
||||
UINT16 pointerFlags;
|
||||
UINT16 xPos;
|
||||
UINT16 yPos;
|
||||
|
||||
WINPR_ASSERT(input);
|
||||
WINPR_ASSERT(s);
|
||||
@ -709,7 +713,8 @@ static BOOL input_recv_mouse_event(rdpInput* input, wStream* s)
|
||||
static BOOL input_recv_relmouse_event(rdpInput* input, wStream* s)
|
||||
{
|
||||
UINT16 pointerFlags;
|
||||
INT16 xDelta, yDelta;
|
||||
INT16 xDelta;
|
||||
INT16 yDelta;
|
||||
|
||||
WINPR_ASSERT(input);
|
||||
WINPR_ASSERT(s);
|
||||
@ -735,7 +740,9 @@ static BOOL input_recv_relmouse_event(rdpInput* input, wStream* s)
|
||||
|
||||
static BOOL input_recv_extended_mouse_event(rdpInput* input, wStream* s)
|
||||
{
|
||||
UINT16 pointerFlags, xPos, yPos;
|
||||
UINT16 pointerFlags;
|
||||
UINT16 xPos;
|
||||
UINT16 yPos;
|
||||
|
||||
WINPR_ASSERT(input);
|
||||
WINPR_ASSERT(s);
|
||||
@ -822,7 +829,8 @@ static BOOL input_recv_event(rdpInput* input, wStream* s)
|
||||
|
||||
BOOL input_recv(rdpInput* input, wStream* s)
|
||||
{
|
||||
UINT16 i, numberEvents;
|
||||
UINT16 i;
|
||||
UINT16 numberEvents;
|
||||
|
||||
WINPR_ASSERT(input);
|
||||
WINPR_ASSERT(s);
|
||||
|
@ -507,8 +507,10 @@ static BOOL saveCal(const rdpSettings* settings, const BYTE* data, size_t length
|
||||
char hash[41] = { 0 };
|
||||
FILE* fp = NULL;
|
||||
char* licenseStorePath = NULL;
|
||||
char filename[MAX_PATH] = { 0 }, filenameNew[MAX_PATH] = { 0 };
|
||||
char *filepath = NULL, *filepathNew = NULL;
|
||||
char filename[MAX_PATH] = { 0 };
|
||||
char filenameNew[MAX_PATH] = { 0 };
|
||||
char* filepath = NULL;
|
||||
char* filepathNew = NULL;
|
||||
|
||||
size_t written;
|
||||
BOOL ret = FALSE;
|
||||
@ -591,7 +593,8 @@ out:
|
||||
|
||||
static BYTE* loadCalFile(const rdpSettings* settings, const char* hostname, size_t* dataLen)
|
||||
{
|
||||
char *licenseStorePath = NULL, *calPath = NULL;
|
||||
char* licenseStorePath = NULL;
|
||||
char* calPath = NULL;
|
||||
char calFilename[MAX_PATH] = { 0 };
|
||||
char hash[41] = { 0 };
|
||||
INT64 length = 0;
|
||||
@ -2049,7 +2052,8 @@ fail:
|
||||
|
||||
static BOOL license_read_encrypted_blob(const rdpLicense* license, wStream* s, LICENSE_BLOB* target)
|
||||
{
|
||||
UINT16 wBlobType = 0, wBlobLen = 0;
|
||||
UINT16 wBlobType = 0;
|
||||
UINT16 wBlobLen = 0;
|
||||
|
||||
WINPR_ASSERT(license);
|
||||
WINPR_ASSERT(target);
|
||||
@ -2090,7 +2094,10 @@ BOOL license_read_new_or_upgrade_license_packet(rdpLicense* license, wStream* s)
|
||||
{
|
||||
UINT32 os_major = 0;
|
||||
UINT32 os_minor = 0;
|
||||
UINT32 cbScope = 0, cbCompanyName = 0, cbProductId = 0, cbLicenseInfo = 0;
|
||||
UINT32 cbScope = 0;
|
||||
UINT32 cbCompanyName = 0;
|
||||
UINT32 cbProductId = 0;
|
||||
UINT32 cbLicenseInfo = 0;
|
||||
wStream sbuffer = { 0 };
|
||||
wStream* licenseStream = NULL;
|
||||
BOOL ret = FALSE;
|
||||
|
@ -821,7 +821,8 @@ static BOOL mcs_send_connect_initial(rdpMcs* mcs)
|
||||
int status = -1;
|
||||
size_t length;
|
||||
wStream* s = NULL;
|
||||
size_t bm, em;
|
||||
size_t bm;
|
||||
size_t em;
|
||||
wStream* gcc_CCrq = NULL;
|
||||
wStream* client_data = NULL;
|
||||
rdpContext* context;
|
||||
@ -942,7 +943,8 @@ BOOL mcs_send_connect_response(rdpMcs* mcs)
|
||||
size_t length;
|
||||
int status = -1;
|
||||
wStream* s = NULL;
|
||||
size_t bm, em;
|
||||
size_t bm;
|
||||
size_t em;
|
||||
wStream* gcc_CCrsp = NULL;
|
||||
wStream* server_data = NULL;
|
||||
|
||||
@ -1315,7 +1317,8 @@ fail:
|
||||
|
||||
BOOL mcs_recv_disconnect_provider_ultimatum(rdpMcs* mcs, wStream* s, int* reason)
|
||||
{
|
||||
BYTE b1, b2;
|
||||
BYTE b1;
|
||||
BYTE b2;
|
||||
|
||||
WINPR_ASSERT(mcs);
|
||||
WINPR_ASSERT(s);
|
||||
|
@ -2976,7 +2976,8 @@ static int input_message_process_input_class(rdpInputProxy* proxy, wMessage* msg
|
||||
case Input_MouseEvent:
|
||||
{
|
||||
UINT32 pos;
|
||||
UINT16 x, y;
|
||||
UINT16 x;
|
||||
UINT16 y;
|
||||
pos = (UINT32)(size_t)msg->lParam;
|
||||
x = ((pos & 0xFFFF0000) >> 16);
|
||||
y = (pos & 0x0000FFFF);
|
||||
@ -2987,7 +2988,8 @@ static int input_message_process_input_class(rdpInputProxy* proxy, wMessage* msg
|
||||
case Input_ExtendedMouseEvent:
|
||||
{
|
||||
UINT32 pos;
|
||||
UINT16 x, y;
|
||||
UINT16 x;
|
||||
UINT16 y;
|
||||
pos = (UINT32)(size_t)msg->lParam;
|
||||
x = ((pos & 0xFFFF0000) >> 16);
|
||||
y = (pos & 0x0000FFFF);
|
||||
|
@ -1064,7 +1064,8 @@ BOOL nego_send_negotiation_request(rdpNego* nego)
|
||||
BOOL rc = FALSE;
|
||||
wStream* s;
|
||||
size_t length;
|
||||
size_t bm, em;
|
||||
size_t bm;
|
||||
size_t em;
|
||||
BYTE flags = 0;
|
||||
size_t cookie_length;
|
||||
s = Stream_New(NULL, 512);
|
||||
@ -1152,7 +1153,9 @@ fail:
|
||||
|
||||
static BOOL nego_process_correlation_info(rdpNego* nego, wStream* s)
|
||||
{
|
||||
UINT8 type, flags, x;
|
||||
UINT8 type;
|
||||
UINT8 flags;
|
||||
UINT8 x;
|
||||
UINT16 length;
|
||||
BYTE correlationId[16] = { 0 };
|
||||
|
||||
@ -1397,7 +1400,8 @@ BOOL nego_process_negotiation_failure(rdpNego* nego, wStream* s)
|
||||
BOOL nego_send_negotiation_response(rdpNego* nego)
|
||||
{
|
||||
UINT16 length;
|
||||
size_t bm, em;
|
||||
size_t bm;
|
||||
size_t em;
|
||||
BOOL status;
|
||||
wStream* s;
|
||||
BYTE flags;
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user