diff --git a/common/os_calls.c b/common/os_calls.c index 7d932a10..6ad7a78d 100644 --- a/common/os_calls.c +++ b/common/os_calls.c @@ -2213,7 +2213,7 @@ g_strdup(const char *in) char *APP_CC g_strndup(const char *in, const unsigned int maxlen) { - int len; + unsigned int len; char *p; if (in == 0) diff --git a/rdp/rdp_rdp.c b/rdp/rdp_rdp.c index cede7b02..1e7952c5 100644 --- a/rdp/rdp_rdp.c +++ b/rdp/rdp_rdp.c @@ -415,9 +415,9 @@ rdp_rdp_send_confirm_active(struct rdp_rdp *self, struct stream *s) static int APP_CC rdp_rdp_process_color_pointer_pdu(struct rdp_rdp *self, struct stream *s) { - int cache_idx; - int dlen; - int mlen; + unsigned int cache_idx; + unsigned int dlen; + unsigned int mlen; struct rdp_cursor *cursor; in_uint16_le(s, cache_idx); diff --git a/sesman/chansrv/chansrv.c b/sesman/chansrv/chansrv.c index a521581d..0596b5ff 100644 --- a/sesman/chansrv/chansrv.c +++ b/sesman/chansrv/chansrv.c @@ -1628,7 +1628,8 @@ struct_from_dvc_chan_id(tui32 dvc_chan_id) 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]; } @@ -1644,7 +1645,8 @@ remove_struct_with_chan_id(tui32 dvc_chan_id) 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; return 0; diff --git a/sesman/chansrv/chansrv_fuse.c b/sesman/chansrv/chansrv_fuse.c index 0bb9ceff..143b7d6c 100644 --- a/sesman/chansrv/chansrv_fuse.c +++ b/sesman/chansrv/chansrv_fuse.c @@ -295,7 +295,7 @@ int devredir_file_read(void *fusep, tui32 device_id, tui32 FileId, tui32 Length, tui64 Offset); 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); diff --git a/sesman/chansrv/devredir.c b/sesman/chansrv/devredir.c index bb10a6c9..3014e53a 100644 --- a/sesman/chansrv/devredir.c +++ b/sesman/chansrv/devredir.c @@ -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) { - int i; + unsigned int i; int j; tui32 device_count; tui32 device_type; @@ -899,7 +899,7 @@ dev_redir_proc_query_dir_response(IRP *irp, tui32 status; char filename[256]; - int i = 0; + unsigned int i = 0; xstream_rd_u32_le(s_in, Length); @@ -1256,7 +1256,7 @@ devredir_file_read(void *fusep, tui32 DeviceId, tui32 FileId, int APP_CC 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; IRP *irp; diff --git a/sesman/chansrv/rail.c b/sesman/chansrv/rail.c index 36e39889..3470cece 100644 --- a/sesman/chansrv/rail.c +++ b/sesman/chansrv/rail.c @@ -184,7 +184,7 @@ rail_send_key_esc(int window_id) static struct rail_window_data* APP_CC rail_get_window_data(Window window) { - int bytes; + unsigned int bytes; Atom actual_type_return; int actual_format_return; unsigned long nitems_return; @@ -557,7 +557,7 @@ my_timeout(void* data) static int APP_CC rail_process_activate(struct stream *s, int size) { - int window_id; + unsigned int window_id; int enabled; int index; XWindowAttributes window_attributes; diff --git a/sesman/chansrv/smartcard.c b/sesman/chansrv/smartcard.c index 1e692909..41fe66a4 100644 --- a/sesman/chansrv/smartcard.c +++ b/sesman/chansrv/smartcard.c @@ -1256,7 +1256,7 @@ scard_send_GetStatusChange(IRP* irp, char *context, int context_bytes, struct stream *s; tui32 ioctl; int bytes; - int i; + unsigned int i; int num_chars; int index; twchar w_reader_name[100]; diff --git a/sesman/chansrv/smartcard_pcsc.c b/sesman/chansrv/smartcard_pcsc.c index 16938bf9..29bd5a23 100644 --- a/sesman/chansrv/smartcard_pcsc.c +++ b/sesman/chansrv/smartcard_pcsc.c @@ -145,7 +145,7 @@ get_uds_client_by_id(int uds_client_id) /*****************************************************************************/ struct pcsc_context * get_pcsc_context_by_app_context(struct pcsc_uds_client *uds_client, - int app_context) + tui32 app_context) { struct pcsc_context *rv; int index; @@ -173,7 +173,7 @@ get_pcsc_context_by_app_context(struct pcsc_uds_client *uds_client, /*****************************************************************************/ struct pcsc_card * 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_context *lcontext; diff --git a/vnc/vnc.c b/vnc/vnc.c index a72c8dd1..99245b53 100644 --- a/vnc/vnc.c +++ b/vnc/vnc.c @@ -587,7 +587,7 @@ lib_framebuffer_update(struct vnc *v) int cy; int srcx; int srcy; - int encoding; + unsigned int encoding; int Bpp; int pixel; int r;