From 70f3d4c5e23ab53bf82bc5e2029001896bf3823e Mon Sep 17 00:00:00 2001 From: Pavel Roskin Date: Fri, 22 Apr 2016 23:40:48 -0700 Subject: Fix warnings for unused variables read from byte streams --- libxrdp/xrdp_rdp.c | 12 ++++-------- libxrdp/xrdp_sec.c | 3 +-- 2 files changed, 5 insertions(+), 10 deletions(-) (limited to 'libxrdp') diff --git a/libxrdp/xrdp_rdp.c b/libxrdp/xrdp_rdp.c index 1e58a1f4..00bda631 100644 --- a/libxrdp/xrdp_rdp.c +++ b/libxrdp/xrdp_rdp.c @@ -962,7 +962,6 @@ xrdp_rdp_process_data_sync(struct xrdp_rdp *self) static int APP_CC xrdp_rdp_process_screen_update(struct xrdp_rdp *self, struct stream *s) { - int op; int left; int top; int right; @@ -970,7 +969,7 @@ xrdp_rdp_process_screen_update(struct xrdp_rdp *self, struct stream *s) int cx; int cy; - in_uint32_le(s, op); + in_uint8s(s, 4); /* op */ in_uint16_le(s, left); in_uint16_le(s, top); in_uint16_le(s, right); @@ -1129,16 +1128,13 @@ xrdp_rdp_process_frame_ack(struct xrdp_rdp *self, struct stream *s) int APP_CC xrdp_rdp_process_data(struct xrdp_rdp *self, struct stream *s) { - int len; int data_type; - int ctype; - int clen; in_uint8s(s, 6); - in_uint16_le(s, len); + in_uint8s(s, 2); /* len */ in_uint8(s, data_type); - in_uint8(s, ctype); - in_uint16_le(s, clen); + in_uint8s(s, 1); /* ctype */ + in_uint8s(s, 2); /* clen */ DEBUG(("xrdp_rdp_process_data code %d", data_type)); switch (data_type) diff --git a/libxrdp/xrdp_sec.c b/libxrdp/xrdp_sec.c index aae1ac87..3857e2d1 100644 --- a/libxrdp/xrdp_sec.c +++ b/libxrdp/xrdp_sec.c @@ -648,7 +648,6 @@ xrdp_sec_process_logon_info(struct xrdp_sec *self, struct stream *s) int len_directory = 0; int len_ip = 0; int len_dll = 0; - int tzone = 0; char tmpdata[256]; /* initialize (zero out) local variables */ @@ -837,7 +836,7 @@ xrdp_sec_process_logon_info(struct xrdp_sec *self, struct stream *s) { return 1; } - in_uint32_le(s, tzone); /* len of timezone */ + in_uint8s(s, 4); /* len of timezone */ in_uint8s(s, 62); /* skip */ in_uint8s(s, 22); /* skip misc. */ in_uint8s(s, 62); /* skip */ -- cgit v1.2.1