Fix signed to unsigned comparisons reported by g++ 6.1.0
This commit is contained in:
parent
5829323ad8
commit
d1efb0d5ba
@ -2213,7 +2213,7 @@ g_strdup(const char *in)
|
|||||||
char *APP_CC
|
char *APP_CC
|
||||||
g_strndup(const char *in, const unsigned int maxlen)
|
g_strndup(const char *in, const unsigned int maxlen)
|
||||||
{
|
{
|
||||||
int len;
|
unsigned int len;
|
||||||
char *p;
|
char *p;
|
||||||
|
|
||||||
if (in == 0)
|
if (in == 0)
|
||||||
|
@ -415,9 +415,9 @@ rdp_rdp_send_confirm_active(struct rdp_rdp *self, struct stream *s)
|
|||||||
static int APP_CC
|
static int APP_CC
|
||||||
rdp_rdp_process_color_pointer_pdu(struct rdp_rdp *self, struct stream *s)
|
rdp_rdp_process_color_pointer_pdu(struct rdp_rdp *self, struct stream *s)
|
||||||
{
|
{
|
||||||
int cache_idx;
|
unsigned int cache_idx;
|
||||||
int dlen;
|
unsigned int dlen;
|
||||||
int mlen;
|
unsigned int mlen;
|
||||||
struct rdp_cursor *cursor;
|
struct rdp_cursor *cursor;
|
||||||
|
|
||||||
in_uint16_le(s, cache_idx);
|
in_uint16_le(s, cache_idx);
|
||||||
|
@ -1628,7 +1628,8 @@ struct_from_dvc_chan_id(tui32 dvc_chan_id)
|
|||||||
|
|
||||||
for (i = 0; i < MAX_DVC_CHANNELS; i++)
|
for (i = 0; i < MAX_DVC_CHANNELS; i++)
|
||||||
{
|
{
|
||||||
if (g_dvc_channels[i]->dvc_chan_id == dvc_chan_id)
|
if (g_dvc_channels[i]->dvc_chan_id >= 0 &&
|
||||||
|
(tui32) g_dvc_channels[i]->dvc_chan_id == dvc_chan_id)
|
||||||
{
|
{
|
||||||
return g_dvc_channels[i];
|
return g_dvc_channels[i];
|
||||||
}
|
}
|
||||||
@ -1644,7 +1645,8 @@ remove_struct_with_chan_id(tui32 dvc_chan_id)
|
|||||||
|
|
||||||
for (i = 0; i < MAX_DVC_CHANNELS; i++)
|
for (i = 0; i < MAX_DVC_CHANNELS; i++)
|
||||||
{
|
{
|
||||||
if (g_dvc_channels[i]->dvc_chan_id == dvc_chan_id)
|
if (g_dvc_channels[i]->dvc_chan_id >= 0 &&
|
||||||
|
(tui32) g_dvc_channels[i]->dvc_chan_id == dvc_chan_id)
|
||||||
{
|
{
|
||||||
g_dvc_channels[i] = NULL;
|
g_dvc_channels[i] = NULL;
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -295,7 +295,7 @@ int devredir_file_read(void *fusep, tui32 device_id, tui32 FileId,
|
|||||||
tui32 Length, tui64 Offset);
|
tui32 Length, tui64 Offset);
|
||||||
|
|
||||||
int dev_redir_file_write(void *fusep, tui32 device_id, tui32 FileId,
|
int dev_redir_file_write(void *fusep, tui32 device_id, tui32 FileId,
|
||||||
const char *buf, tui32 Length, tui64 Offset);
|
const char *buf, int Length, tui64 Offset);
|
||||||
|
|
||||||
int devredir_file_close(void *fusep, tui32 device_id, tui32 FileId);
|
int devredir_file_close(void *fusep, tui32 device_id, tui32 FileId);
|
||||||
|
|
||||||
|
@ -636,7 +636,7 @@ void dev_redir_proc_client_core_cap_resp(struct stream *s)
|
|||||||
|
|
||||||
void devredir_proc_client_devlist_announce_req(struct stream *s)
|
void devredir_proc_client_devlist_announce_req(struct stream *s)
|
||||||
{
|
{
|
||||||
int i;
|
unsigned int i;
|
||||||
int j;
|
int j;
|
||||||
tui32 device_count;
|
tui32 device_count;
|
||||||
tui32 device_type;
|
tui32 device_type;
|
||||||
@ -899,7 +899,7 @@ dev_redir_proc_query_dir_response(IRP *irp,
|
|||||||
tui32 status;
|
tui32 status;
|
||||||
|
|
||||||
char filename[256];
|
char filename[256];
|
||||||
int i = 0;
|
unsigned int i = 0;
|
||||||
|
|
||||||
xstream_rd_u32_le(s_in, Length);
|
xstream_rd_u32_le(s_in, Length);
|
||||||
|
|
||||||
@ -1256,7 +1256,7 @@ devredir_file_read(void *fusep, tui32 DeviceId, tui32 FileId,
|
|||||||
|
|
||||||
int APP_CC
|
int APP_CC
|
||||||
dev_redir_file_write(void *fusep, tui32 DeviceId, tui32 FileId,
|
dev_redir_file_write(void *fusep, tui32 DeviceId, tui32 FileId,
|
||||||
const char *buf, tui32 Length, tui64 Offset)
|
const char *buf, int Length, tui64 Offset)
|
||||||
{
|
{
|
||||||
struct stream *s;
|
struct stream *s;
|
||||||
IRP *irp;
|
IRP *irp;
|
||||||
|
@ -184,7 +184,7 @@ rail_send_key_esc(int window_id)
|
|||||||
static struct rail_window_data* APP_CC
|
static struct rail_window_data* APP_CC
|
||||||
rail_get_window_data(Window window)
|
rail_get_window_data(Window window)
|
||||||
{
|
{
|
||||||
int bytes;
|
unsigned int bytes;
|
||||||
Atom actual_type_return;
|
Atom actual_type_return;
|
||||||
int actual_format_return;
|
int actual_format_return;
|
||||||
unsigned long nitems_return;
|
unsigned long nitems_return;
|
||||||
@ -557,7 +557,7 @@ my_timeout(void* data)
|
|||||||
static int APP_CC
|
static int APP_CC
|
||||||
rail_process_activate(struct stream *s, int size)
|
rail_process_activate(struct stream *s, int size)
|
||||||
{
|
{
|
||||||
int window_id;
|
unsigned int window_id;
|
||||||
int enabled;
|
int enabled;
|
||||||
int index;
|
int index;
|
||||||
XWindowAttributes window_attributes;
|
XWindowAttributes window_attributes;
|
||||||
|
@ -1256,7 +1256,7 @@ scard_send_GetStatusChange(IRP* irp, char *context, int context_bytes,
|
|||||||
struct stream *s;
|
struct stream *s;
|
||||||
tui32 ioctl;
|
tui32 ioctl;
|
||||||
int bytes;
|
int bytes;
|
||||||
int i;
|
unsigned int i;
|
||||||
int num_chars;
|
int num_chars;
|
||||||
int index;
|
int index;
|
||||||
twchar w_reader_name[100];
|
twchar w_reader_name[100];
|
||||||
|
@ -145,7 +145,7 @@ get_uds_client_by_id(int uds_client_id)
|
|||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
struct pcsc_context *
|
struct pcsc_context *
|
||||||
get_pcsc_context_by_app_context(struct pcsc_uds_client *uds_client,
|
get_pcsc_context_by_app_context(struct pcsc_uds_client *uds_client,
|
||||||
int app_context)
|
tui32 app_context)
|
||||||
{
|
{
|
||||||
struct pcsc_context *rv;
|
struct pcsc_context *rv;
|
||||||
int index;
|
int index;
|
||||||
@ -173,7 +173,7 @@ get_pcsc_context_by_app_context(struct pcsc_uds_client *uds_client,
|
|||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
struct pcsc_card *
|
struct pcsc_card *
|
||||||
get_pcsc_card_by_app_card(struct pcsc_uds_client *uds_client,
|
get_pcsc_card_by_app_card(struct pcsc_uds_client *uds_client,
|
||||||
int app_card, struct pcsc_context **acontext)
|
tui32 app_card, struct pcsc_context **acontext)
|
||||||
{
|
{
|
||||||
struct pcsc_card *lcard;
|
struct pcsc_card *lcard;
|
||||||
struct pcsc_context *lcontext;
|
struct pcsc_context *lcontext;
|
||||||
|
Loading…
Reference in New Issue
Block a user