summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenrik Andersson <hean01@cendio.com>2017-10-17 10:48:53 +0200
committerHenrik Andersson <hean01@cendio.com>2017-10-17 10:50:14 +0200
commitfd1673392e4e65faca4612e4acb9c5fa4462def5 (patch)
tree49e7311ce7566988101c26e36f5570568e4f5ece
parent267db2ceffc75989559608f92e632a93b7dc1f0f (diff)
downloadrdesktop-fd1673392e4e65faca4612e4acb9c5fa4462def5.zip
Fix unused-but-set-variable compiler warnings
-rw-r--r--iso.c9
-rw-r--r--licence.c4
-rw-r--r--rdpdr.c6
-rw-r--r--rdpsnd_alsa.c5
-rw-r--r--secure.c3
-rw-r--r--serial.c4
6 files changed, 9 insertions, 22 deletions
diff --git a/iso.c b/iso.c
index 7fccdd1..20702e7 100644
--- a/iso.c
+++ b/iso.c
@@ -3,7 +3,7 @@
Protocol services - ISO layer
Copyright (C) Matthew Chapman <matthewc.unsw.edu.au> 1999-2008
Copyright 2005-2011 Peter Astrand <astrand@cendio.se> for Cendio AB
- Copyright 2012 Henrik Andersson <hean01@cendio.se> for Cendio AB
+ Copyright 2012-2017 Henrik Andersson <hean01@cendio.se> for Cendio AB
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -251,13 +251,12 @@ iso_connect(char *server, char *username, char *domain, char *password,
/* handle RDP_NEG_REQ response */
const char *reason = NULL;
- uint8 type = 0, flags = 0;
- uint16 length = 0;
+ uint8 type = 0;
uint32 data = 0;
in_uint8(s, type);
- in_uint8(s, flags);
- in_uint16(s, length);
+ in_uint8s(s, 1); /* skip flags */
+ in_uint8s(s, 2); /* skip length */
in_uint32(s, data);
if (type == RDP_NEG_FAILURE)
diff --git a/licence.c b/licence.c
index 9f7c5bc..619b61c 100644
--- a/licence.c
+++ b/licence.c
@@ -310,10 +310,10 @@ licence_process_error_alert(STREAM s)
{
uint32 error_code;
uint32 state_transition;
- uint32 error_info;
+
in_uint32(s, error_code);
in_uint32(s, state_transition);
- in_uint32(s, error_info);
+ in_uint8s(s, 4); /* Skip error_info */
/* There is a special case in the error alert handling, when licensing is all good
and the server is not sending a license to client, a "Server License Error PDU -
diff --git a/rdpdr.c b/rdpdr.c
index d30cafa..08a44b4 100644
--- a/rdpdr.c
+++ b/rdpdr.c
@@ -398,9 +398,7 @@ rdpdr_process_irp(STREAM s)
minor,
device,
offset,
- bytes_in,
bytes_out,
- error_mode,
share_mode, disposition, total_timeout, interval_timeout, flags_and_attributes = 0;
char *filename;
@@ -478,7 +476,7 @@ rdpdr_process_irp(STREAM s)
in_uint32_be(s, desired_access);
in_uint8s(s, 0x08); /* unknown */
- in_uint32_le(s, error_mode);
+ in_uint8s(s, 4); /* skip error_mode*/
in_uint32_le(s, share_mode);
in_uint32_le(s, disposition);
in_uint32_le(s, flags_and_attributes);
@@ -731,7 +729,7 @@ rdpdr_process_irp(STREAM s)
}
in_uint32_le(s, bytes_out);
- in_uint32_le(s, bytes_in);
+ in_uint8s(s,4); /* skip bytes_in */
in_uint32_le(s, request);
in_uint8s(s, 0x14);
diff --git a/rdpsnd_alsa.c b/rdpsnd_alsa.c
index 443d169..66e741d 100644
--- a/rdpsnd_alsa.c
+++ b/rdpsnd_alsa.c
@@ -168,12 +168,8 @@ alsa_set_format(snd_pcm_t * pcm, RD_WAVEFORMATEX * pwfx)
snd_pcm_hw_params_t *hwparams = NULL;
int err;
unsigned int buffertime;
- short samplewidth;
- int audiochannels;
unsigned int rate;
- samplewidth = pwfx->wBitsPerSample / 8;
-
if ((err = snd_pcm_hw_params_malloc(&hwparams)) < 0)
{
logger(Sound, Error, "alsa_set_format(), snd_pcm_hw_params_malloc() failed: %s",
@@ -235,7 +231,6 @@ alsa_set_format(snd_pcm_t * pcm, RD_WAVEFORMATEX * pwfx)
return False;
}
- audiochannels = pwfx->nChannels;
if ((err = snd_pcm_hw_params_set_channels(pcm, hwparams, pwfx->nChannels)) < 0)
{
logger(Sound, Error,
diff --git a/secure.c b/secure.c
index 08ad938..256f720 100644
--- a/secure.c
+++ b/secure.c
@@ -815,7 +815,6 @@ STREAM
sec_recv(uint8 * rdpver)
{
uint16 sec_flags;
- uint16 sec_flags_hi;
uint16 channel;
STREAM s;
@@ -837,7 +836,7 @@ sec_recv(uint8 * rdpver)
{
/* TS_SECURITY_HEADER */
in_uint16_le(s, sec_flags);
- in_uint16_le(s, sec_flags_hi);
+ in_uint8s(s, 2); /* skip sec_flags_hi */
if (g_encryption)
{
diff --git a/serial.c b/serial.c
index 9e9b979..2cb441e 100644
--- a/serial.c
+++ b/serial.c
@@ -554,10 +554,8 @@ serial_create(uint32 device_id, uint32 access, uint32 share_mode, uint32 disposi
{
RD_NTHANDLE serial_fd;
SERIAL_DEVICE *pser_inf;
- struct termios *ptermios;
pser_inf = (SERIAL_DEVICE *) g_rdpdr_device[device_id].pdevice_data;
- ptermios = pser_inf->ptermios;
serial_fd = open(g_rdpdr_device[device_id].local_path, O_RDWR | O_NOCTTY | O_NONBLOCK);
if (serial_fd == -1)
@@ -705,13 +703,11 @@ serial_device_control(RD_NTHANDLE handle, uint32 request, STREAM in, STREAM out)
uint32 result, modemstate;
uint8 immediate;
SERIAL_DEVICE *pser_inf;
- struct termios *ptermios;
if ((request >> 16) != FILE_DEVICE_SERIAL_PORT)
return RD_STATUS_INVALID_PARAMETER;
pser_inf = get_serial_info(handle);
- ptermios = pser_inf->ptermios;
/* extract operation */
request >>= 2;