diff options
author | Pavel Roskin <plroskin@gmail.com> | 2016-04-22 23:40:48 -0700 |
---|---|---|
committer | Pavel Roskin <plroskin@gmail.com> | 2016-04-23 00:18:38 -0700 |
commit | 70f3d4c5e23ab53bf82bc5e2029001896bf3823e (patch) | |
tree | de922895b37cef884df737372669ac41241b2dcc /rdp | |
parent | 95e1603f9dda52a7846ad454082712ce9a7aa75e (diff) | |
download | xrdp-proprietary-70f3d4c5e23ab53bf82bc5e2029001896bf3823e.tar.gz xrdp-proprietary-70f3d4c5e23ab53bf82bc5e2029001896bf3823e.zip |
Fix warnings for unused variables read from byte streams
Diffstat (limited to 'rdp')
-rw-r--r-- | rdp/rdp_orders.c | 9 | ||||
-rw-r--r-- | rdp/rdp_rdp.c | 18 |
2 files changed, 9 insertions, 18 deletions
diff --git a/rdp/rdp_orders.c b/rdp/rdp_orders.c index 518a42ee..1cad819d 100644 --- a/rdp/rdp_orders.c +++ b/rdp/rdp_orders.c @@ -225,7 +225,6 @@ rdp_orders_process_raw_bmpcache(struct rdp_orders *self, struct stream *s, int flags) { int cache_idx = 0; - int bufsize = 0; int cache_id = 0; int width = 0; int height = 0; @@ -244,7 +243,7 @@ rdp_orders_process_raw_bmpcache(struct rdp_orders *self, struct stream *s, in_uint8(s, height); in_uint8(s, bpp); Bpp = (bpp + 7) / 8; - in_uint16_le(s, bufsize); + in_uint8s(s, 2); /* bufsize */ in_uint16_le(s, cache_idx); inverted = (char *)g_malloc(width * height * Bpp, 0); @@ -326,8 +325,6 @@ rdp_orders_process_bmpcache(struct rdp_orders *self, struct stream *s, int bpp = 0; int Bpp = 0; int bufsize = 0; - int row_size = 0; - int final_size = 0; struct rdp_bitmap *bitmap = (struct rdp_bitmap *)NULL; struct stream *rec_s = (struct stream *)NULL; @@ -348,8 +345,8 @@ rdp_orders_process_bmpcache(struct rdp_orders *self, struct stream *s, { in_uint8s(s, 2); /* pad */ in_uint16_le(s, size); - in_uint16_le(s, row_size); - in_uint16_le(s, final_size); + in_uint8s(s, 2); /* row_size */ + in_uint8s(s, 2); /* final_size */ } in_uint8p(s, data, size); diff --git a/rdp/rdp_rdp.c b/rdp/rdp_rdp.c index 9ce63664..d5c8e27f 100644 --- a/rdp/rdp_rdp.c +++ b/rdp/rdp_rdp.c @@ -506,8 +506,6 @@ static int APP_CC rdp_rdp_process_pointer_pdu(struct rdp_rdp *self, struct stream *s) { int message_type; - int x; - int y; int rv; rv = 0; @@ -517,8 +515,8 @@ rdp_rdp_process_pointer_pdu(struct rdp_rdp *self, struct stream *s) switch (message_type) { case RDP_POINTER_MOVE: - in_uint16_le(s, x); - in_uint16_le(s, y); + in_uint8s(s, 2); /* x */ + in_uint8s(s, 2); /* y */ break; case RDP_POINTER_COLOR: rv = rdp_rdp_process_color_pointer_pdu(self, s); @@ -934,15 +932,13 @@ int APP_CC rdp_rdp_process_data_pdu(struct rdp_rdp *self, struct stream *s) { int data_pdu_type; - int ctype; - int len; int rv; rv = 0; in_uint8s(s, 6); /* shareid, pad, streamid */ - in_uint16_le(s, len); + in_uint8s(s, 2); /* len */ in_uint8(s, data_pdu_type); - in_uint8(s, ctype); + in_uint8s(s, 1); /* ctype */ in_uint8s(s, 2); /* clen */ switch (data_pdu_type) @@ -983,14 +979,12 @@ rdp_rdp_process_general_caps(struct rdp_rdp *self, struct stream *s) static void APP_CC rdp_rdp_process_bitmap_caps(struct rdp_rdp *self, struct stream *s) { - int width = 0; - int height = 0; int bpp = 0; in_uint16_le(s, bpp); in_uint8s(s, 6); - in_uint16_le(s, width); - in_uint16_le(s, height); + in_uint8s(s, 2); /* width */ + in_uint8s(s, 2); /* height */ self->mod->rdp_bpp = bpp; /* todo, call reset if needed and use width and height */ } |