mirror of https://github.com/neutrinolabs/xrdp
Fix warnings for unused variables read from byte streams
This commit is contained in:
parent
95e1603f9d
commit
70f3d4c5e2
|
@ -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)
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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 */
|
||||
}
|
||||
|
|
|
@ -756,7 +756,6 @@ int DEFAULT_CC
|
|||
my_trans_data_in(struct trans *trans)
|
||||
{
|
||||
struct stream *s = (struct stream *)NULL;
|
||||
int id = 0;
|
||||
int size = 0;
|
||||
int error = 0;
|
||||
|
||||
|
@ -772,7 +771,7 @@ my_trans_data_in(struct trans *trans)
|
|||
|
||||
LOGM((LOG_LEVEL_DEBUG, "my_trans_data_in:"));
|
||||
s = trans_get_in_s(trans);
|
||||
in_uint32_le(s, id);
|
||||
in_uint8s(s, 4); /* id */
|
||||
in_uint32_le(s, size);
|
||||
error = trans_force_read(trans, size - 8);
|
||||
|
||||
|
|
|
@ -531,7 +531,6 @@ clipboard_process_file_request(struct stream *s, int clip_msg_status,
|
|||
int lindex;
|
||||
int dwFlags;
|
||||
int nPositionLow;
|
||||
int nPositionHigh;
|
||||
int cbRequested;
|
||||
//int clipDataId;
|
||||
|
||||
|
@ -541,7 +540,7 @@ clipboard_process_file_request(struct stream *s, int clip_msg_status,
|
|||
in_uint32_le(s, lindex);
|
||||
in_uint32_le(s, dwFlags);
|
||||
in_uint32_le(s, nPositionLow);
|
||||
in_uint32_le(s, nPositionHigh);
|
||||
in_uint8s(s, 4); /* nPositionHigh */
|
||||
in_uint32_le(s, cbRequested);
|
||||
//in_uint32_le(s, clipDataId); /* options, used when locking */
|
||||
if (dwFlags & CB_FILECONTENTS_SIZE)
|
||||
|
|
|
@ -342,24 +342,24 @@ drdynvc_process_data_first(struct stream *s, unsigned char cmd)
|
|||
|
||||
uint32_t chan_id;
|
||||
int bytes_in_stream;
|
||||
int data_len;
|
||||
int Len;
|
||||
|
||||
drdynvc_get_chan_id(s, cmd, &chan_id);
|
||||
|
||||
Len = (cmd >> 2) & 0x03;
|
||||
|
||||
/* skip data_len */
|
||||
if (Len == 0)
|
||||
{
|
||||
in_uint8(s, data_len);
|
||||
in_uint8s(s, 1);
|
||||
}
|
||||
else if (Len == 1)
|
||||
{
|
||||
in_uint16_le(s, data_len);
|
||||
in_uint8s(s, 2);
|
||||
}
|
||||
else
|
||||
{
|
||||
in_uint32_le(s, data_len);
|
||||
in_uint8s(s, 4);
|
||||
}
|
||||
|
||||
bytes_in_stream = stream_length_after_p(s);
|
||||
|
|
Loading…
Reference in New Issue