Markup unused parameters

This commit is contained in:
Henrik Andersson 2017-10-20 11:05:52 +02:00
parent 987d9c1147
commit 896a923f55
19 changed files with 78 additions and 1 deletions

View File

@ -749,6 +749,7 @@ bitmap_decompress3(uint8 * output, int width, int height, uint8 * input, int siz
static int static int
process_plane(uint8 * in, int width, int height, uint8 * out, int size) process_plane(uint8 * in, int width, int height, uint8 * out, int size)
{ {
UNUSED(size);
int indexw; int indexw;
int indexh; int indexh;
int code; int code;

View File

@ -69,6 +69,7 @@ channel_register(char *name, uint32 flags, void (*callback) (STREAM))
STREAM STREAM
channel_init(VCHANNEL * channel, uint32 length) channel_init(VCHANNEL * channel, uint32 length)
{ {
UNUSED(channel);
STREAM s; STREAM s;
s = sec_init(g_encryption ? SEC_ENCRYPT : 0, length + 8); s = sec_init(g_encryption ? SEC_ENCRYPT : 0, length + 8);

1
cssp.c
View File

@ -680,6 +680,7 @@ cssp_read_tsrequest(STREAM token, STREAM pubkey)
RD_BOOL RD_BOOL
cssp_connect(char *server, char *user, char *domain, char *password, STREAM s) cssp_connect(char *server, char *user, char *domain, char *password, STREAM s)
{ {
UNUSED(s);
OM_uint32 actual_time; OM_uint32 actual_time;
gss_cred_id_t cred; gss_cred_id_t cred;
gss_buffer_desc input_tok, output_tok; gss_buffer_desc input_tok, output_tok;

1
ctrl.c
View File

@ -365,6 +365,7 @@ ctrl_add_fds(int *n, fd_set * rfds)
void void
ctrl_check_fds(fd_set * rfds, fd_set * wfds) ctrl_check_fds(fd_set * rfds, fd_set * wfds)
{ {
UNUSED(wfds);
int ns, res, offs; int ns, res, offs;
struct sockaddr_un fsaun; struct sockaddr_un fsaun;
socklen_t fromlen; socklen_t fromlen;

5
disk.c
View File

@ -739,6 +739,7 @@ disk_query_information(RD_NTHANDLE handle, uint32 info_class, STREAM out)
RD_NTSTATUS RD_NTSTATUS
disk_set_information(RD_NTHANDLE handle, uint32 info_class, STREAM in, STREAM out) disk_set_information(RD_NTHANDLE handle, uint32 info_class, STREAM in, STREAM out)
{ {
UNUSED(out);
uint32 length, file_attributes, ft_high, ft_low; uint32 length, file_attributes, ft_high, ft_low;
char *newname, fullpath[PATH_MAX]; char *newname, fullpath[PATH_MAX];
struct fileinfo *pfinfo; struct fileinfo *pfinfo;
@ -1007,6 +1008,7 @@ disk_create_notify(RD_NTHANDLE handle, uint32 info_class)
static RD_NTSTATUS static RD_NTSTATUS
NotifyInfo(RD_NTHANDLE handle, uint32 info_class, NOTIFY * p) NotifyInfo(RD_NTHANDLE handle, uint32 info_class, NOTIFY * p)
{ {
UNUSED(info_class);
struct fileinfo *pfinfo; struct fileinfo *pfinfo;
struct stat filestat; struct stat filestat;
struct dirent *dp; struct dirent *dp;
@ -1421,6 +1423,9 @@ disk_query_directory(RD_NTHANDLE handle, uint32 info_class, char *pattern, STREA
static RD_NTSTATUS static RD_NTSTATUS
disk_device_control(RD_NTHANDLE handle, uint32 request, STREAM in, STREAM out) disk_device_control(RD_NTHANDLE handle, uint32 request, STREAM in, STREAM out)
{ {
UNUSED(in);
UNUSED(out);
logger(Disk, Debug, "disk_device_control(handle=0x%x, request=0x%x, ...)", handle, request); logger(Disk, Debug, "disk_device_control(handle=0x%x, request=0x%x, ...)", handle, request);
if (((request >> 16) != 20) || ((request >> 16) != 9)) if (((request >> 16) != 20) || ((request >> 16) != 9))
return RD_STATUS_INVALID_PARAMETER; return RD_STATUS_INVALID_PARAMETER;

1
iso.c
View File

@ -204,6 +204,7 @@ RD_BOOL
iso_connect(char *server, char *username, char *domain, char *password, iso_connect(char *server, char *username, char *domain, char *password,
RD_BOOL reconnect, uint32 * selected_protocol) RD_BOOL reconnect, uint32 * selected_protocol)
{ {
UNUSED(reconnect);
STREAM s; STREAM s;
uint8 code; uint8 code;
uint32 neg_proto; uint32 neg_proto;

View File

@ -43,6 +43,7 @@ static void lspci_send(const char *output);
static RD_BOOL static RD_BOOL
handle_child_line(const char *line, void *data) handle_child_line(const char *line, void *data)
{ {
UNUSED(data);
const char *val; const char *val;
char buf[1024]; char buf[1024];
@ -108,6 +109,7 @@ handle_child_line(const char *line, void *data)
static RD_BOOL static RD_BOOL
lspci_process_line(const char *line, void *data) lspci_process_line(const char *line, void *data)
{ {
UNUSED(data);
char *lspci_command[5] = { "lspci", "-m", "-n", "-v", NULL }; char *lspci_command[5] = { "lspci", "-m", "-n", "-v", NULL };
if (!strcmp(line, "LSPCI")) if (!strcmp(line, "LSPCI"))

1
mcs.c
View File

@ -86,6 +86,7 @@ mcs_send_connect_initial(STREAM mcs_data)
static RD_BOOL static RD_BOOL
mcs_recv_connect_response(STREAM mcs_data) mcs_recv_connect_response(STREAM mcs_data)
{ {
UNUSED(mcs_data);
uint8 result; uint8 result;
int length; int length;
STREAM s; STREAM s;

View File

@ -826,6 +826,7 @@ process_ellipse2(STREAM s, ELLIPSE2_ORDER * os, uint32 present, RD_BOOL delta)
static void static void
process_text2(STREAM s, TEXT2_ORDER * os, uint32 present, RD_BOOL delta) process_text2(STREAM s, TEXT2_ORDER * os, uint32 present, RD_BOOL delta)
{ {
UNUSED(delta);
BRUSH brush; BRUSH brush;
if (present & 0x000001) if (present & 0x000001)
@ -1175,6 +1176,7 @@ process_compressed_8x8_brush_data(uint8 * in, uint8 * out, int Bpp)
static void static void
process_brushcache(STREAM s, uint16 flags) process_brushcache(STREAM s, uint16 flags)
{ {
UNUSED(flags);
BRUSHDATA brush_data; BRUSHDATA brush_data;
uint8 cache_idx, colour_code, width, height, size, type; uint8 cache_idx, colour_code, width, height, size, type;
uint8 *comp_brush; uint8 *comp_brush;

View File

@ -78,6 +78,11 @@ static RD_NTSTATUS
parallel_create(uint32 device_id, uint32 access, uint32 share_mode, uint32 disposition, parallel_create(uint32 device_id, uint32 access, uint32 share_mode, uint32 disposition,
uint32 flags, char *filename, RD_NTHANDLE * handle) uint32 flags, char *filename, RD_NTHANDLE * handle)
{ {
UNUSED(access);
UNUSED(share_mode);
UNUSED(disposition);
UNUSED(flags);
UNUSED(filename);
int parallel_fd; int parallel_fd;
parallel_fd = open(g_rdpdr_device[device_id].local_path, O_RDWR); parallel_fd = open(g_rdpdr_device[device_id].local_path, O_RDWR);
@ -116,6 +121,7 @@ parallel_close(RD_NTHANDLE handle)
static RD_NTSTATUS static RD_NTSTATUS
parallel_read(RD_NTHANDLE handle, uint8 * data, uint32 length, uint32 offset, uint32 * result) parallel_read(RD_NTHANDLE handle, uint8 * data, uint32 length, uint32 offset, uint32 * result)
{ {
UNUSED(offset);
*result = read(handle, data, length); *result = read(handle, data, length);
return RD_STATUS_SUCCESS; return RD_STATUS_SUCCESS;
} }
@ -123,6 +129,7 @@ parallel_read(RD_NTHANDLE handle, uint8 * data, uint32 length, uint32 offset, ui
static RD_NTSTATUS static RD_NTSTATUS
parallel_write(RD_NTHANDLE handle, uint8 * data, uint32 length, uint32 offset, uint32 * result) parallel_write(RD_NTHANDLE handle, uint8 * data, uint32 length, uint32 offset, uint32 * result)
{ {
UNUSED(offset);
int rc = RD_STATUS_SUCCESS; int rc = RD_STATUS_SUCCESS;
int n = write(handle, data, length); int n = write(handle, data, length);
@ -158,6 +165,9 @@ parallel_write(RD_NTHANDLE handle, uint8 * data, uint32 length, uint32 offset, u
static RD_NTSTATUS static RD_NTSTATUS
parallel_device_control(RD_NTHANDLE handle, uint32 request, STREAM in, STREAM out) parallel_device_control(RD_NTHANDLE handle, uint32 request, STREAM in, STREAM out)
{ {
UNUSED(handle);
UNUSED(in);
UNUSED(out);
if ((request >> 16) != FILE_DEVICE_PARALLEL) if ((request >> 16) != FILE_DEVICE_PARALLEL)
return RD_STATUS_INVALID_PARAMETER; return RD_STATUS_INVALID_PARAMETER;

View File

@ -103,6 +103,11 @@ static RD_NTSTATUS
printer_create(uint32 device_id, uint32 access, uint32 share_mode, uint32 disposition, uint32 flags, printer_create(uint32 device_id, uint32 access, uint32 share_mode, uint32 disposition, uint32 flags,
char *filename, RD_NTHANDLE * handle) char *filename, RD_NTHANDLE * handle)
{ {
UNUSED(access);
UNUSED(share_mode);
UNUSED(disposition);
UNUSED(flags);
UNUSED(filename);
char cmd[256]; char cmd[256];
PRINTER *pprinter_data; PRINTER *pprinter_data;
@ -141,6 +146,7 @@ printer_close(RD_NTHANDLE handle)
static RD_NTSTATUS static RD_NTSTATUS
printer_write(RD_NTHANDLE handle, uint8 * data, uint32 length, uint32 offset, uint32 * result) printer_write(RD_NTHANDLE handle, uint8 * data, uint32 length, uint32 offset, uint32 * result)
{ {
UNUSED(offset);
PRINTER *pprinter_data; PRINTER *pprinter_data;
pprinter_data = get_printer_data(handle); pprinter_data = get_printer_data(handle);

View File

@ -110,6 +110,8 @@ rdpsnd_send_waveconfirm(uint16 tick, uint8 packet_index)
void void
rdpsnd_record(const void *data, unsigned int size) rdpsnd_record(const void *data, unsigned int size)
{ {
UNUSED(data);
UNUSED(size);
/* TODO: Send audio over RDP */ /* TODO: Send audio over RDP */
} }
@ -430,6 +432,7 @@ rdpsnd_process(STREAM s)
static RD_BOOL static RD_BOOL
rdpsnddbg_line_handler(const char *line, void *data) rdpsnddbg_line_handler(const char *line, void *data)
{ {
UNUSED(data);
logger(Sound, Debug, "rdpsnddbg_line_handler(), \"%s\"", line); logger(Sound, Debug, "rdpsnddbg_line_handler(), \"%s\"", line);
return True; return True;
} }

View File

@ -59,6 +59,7 @@ void alsa_record(void);
void void
alsa_add_fds(int *n, fd_set * rfds, fd_set * wfds, struct timeval *tv) alsa_add_fds(int *n, fd_set * rfds, fd_set * wfds, struct timeval *tv)
{ {
UNUSED(tv);
int err; int err;
struct pollfd *f; struct pollfd *f;

View File

@ -179,6 +179,7 @@ uint32
rdpsnd_dsp_resample(unsigned char **out, unsigned char *in, unsigned int size, rdpsnd_dsp_resample(unsigned char **out, unsigned char *in, unsigned int size,
RD_WAVEFORMATEX * format, RD_BOOL stream_be) RD_WAVEFORMATEX * format, RD_BOOL stream_be)
{ {
UNUSED(stream_be);
#ifdef HAVE_LIBSAMPLERATE #ifdef HAVE_LIBSAMPLERATE
SRC_DATA resample_data; SRC_DATA resample_data;
float *infloat, *outfloat; float *infloat, *outfloat;

View File

@ -71,6 +71,7 @@ static RD_BOOL oss_set_format(RD_WAVEFORMATEX * pwfx);
static void static void
oss_add_fds(int *n, fd_set * rfds, fd_set * wfds, struct timeval *tv) oss_add_fds(int *n, fd_set * rfds, fd_set * wfds, struct timeval *tv)
{ {
UNUSED(tv);
if (dsp_fd == -1) if (dsp_fd == -1)
return; return;

26
scard.c
View File

@ -99,24 +99,43 @@ static RD_NTSTATUS
scard_create(uint32 device_id, uint32 accessmask, uint32 sharemode, uint32 create_disposition, scard_create(uint32 device_id, uint32 accessmask, uint32 sharemode, uint32 create_disposition,
uint32 flags_and_attributes, char *filename, RD_NTHANDLE * phandle) uint32 flags_and_attributes, char *filename, RD_NTHANDLE * phandle)
{ {
return RD_STATUS_SUCCESS; UNUSED(device_id);
UNUSED(accessmask);
UNUSED(sharemode);
UNUSED(create_disposition);
UNUSED(flags_and_attributes);
UNUSED(filename);
UNUSED(phandle);
return RD_STATUS_SUCCESS;
} }
static RD_NTSTATUS static RD_NTSTATUS
scard_close(RD_NTHANDLE handle) scard_close(RD_NTHANDLE handle)
{ {
UNUSED(handle);
return RD_STATUS_SUCCESS; return RD_STATUS_SUCCESS;
} }
static RD_NTSTATUS static RD_NTSTATUS
scard_read(RD_NTHANDLE handle, uint8 * data, uint32 length, uint32 offset, uint32 * result) scard_read(RD_NTHANDLE handle, uint8 * data, uint32 length, uint32 offset, uint32 * result)
{ {
UNUSED(handle);
UNUSED(data);
UNUSED(length);
UNUSED(offset);
UNUSED(result);
return RD_STATUS_SUCCESS; return RD_STATUS_SUCCESS;
} }
static RD_NTSTATUS static RD_NTSTATUS
scard_write(RD_NTHANDLE handle, uint8 * data, uint32 length, uint32 offset, uint32 * result) scard_write(RD_NTHANDLE handle, uint8 * data, uint32 length, uint32 offset, uint32 * result)
{ {
UNUSED(handle);
UNUSED(data);
UNUSED(length);
UNUSED(offset);
UNUSED(result);
return RD_STATUS_SUCCESS; return RD_STATUS_SUCCESS;
} }
@ -644,6 +663,7 @@ inSkipLinked(STREAM in)
static MYPCSC_DWORD static MYPCSC_DWORD
SC_returnCode(MYPCSC_DWORD rc, PMEM_HANDLE * handle, STREAM in, STREAM out) SC_returnCode(MYPCSC_DWORD rc, PMEM_HANDLE * handle, STREAM in, STREAM out)
{ {
UNUSED(in);
SC_xfreeallmemory(handle); SC_xfreeallmemory(handle);
out_uint8s(out, 256); out_uint8s(out, 256);
return rc; return rc;
@ -658,6 +678,7 @@ SC_returnNoMemoryError(PMEM_HANDLE * handle, STREAM in, STREAM out)
static MYPCSC_DWORD static MYPCSC_DWORD
TS_SCardEstablishContext(STREAM in, STREAM out) TS_SCardEstablishContext(STREAM in, STREAM out)
{ {
UNUSED(in);
MYPCSC_DWORD rv; MYPCSC_DWORD rv;
MYPCSC_SCARDCONTEXT myHContext; MYPCSC_SCARDCONTEXT myHContext;
SERVER_SCARDCONTEXT hContext; SERVER_SCARDCONTEXT hContext;
@ -2255,6 +2276,7 @@ TS_SCardControl(STREAM in, STREAM out)
static MYPCSC_DWORD static MYPCSC_DWORD
TS_SCardAccessStartedEvent(STREAM in, STREAM out) TS_SCardAccessStartedEvent(STREAM in, STREAM out)
{ {
UNUSED(in);
logger(SmartCard, Debug, "TS_SCardAccessStartedEvent()"); logger(SmartCard, Debug, "TS_SCardAccessStartedEvent()");
out_uint8s(out, 8); out_uint8s(out, 8);
return SCARD_S_SUCCESS; return SCARD_S_SUCCESS;
@ -2264,6 +2286,7 @@ TS_SCardAccessStartedEvent(STREAM in, STREAM out)
static RD_NTSTATUS static RD_NTSTATUS
scard_device_control(RD_NTHANDLE handle, uint32 request, STREAM in, STREAM out) scard_device_control(RD_NTHANDLE handle, uint32 request, STREAM in, STREAM out)
{ {
UNUSED(handle);
SERVER_DWORD Result = 0x00000000; SERVER_DWORD Result = 0x00000000;
unsigned char *psize, *pend, *pStatusCode; unsigned char *psize, *pend, *pStatusCode;
SERVER_DWORD addToEnd = 0; SERVER_DWORD addToEnd = 0;
@ -2652,6 +2675,7 @@ SC_handleRequest(PSCThreadData data)
static void * static void *
queue_handler_function(void *data) queue_handler_function(void *data)
{ {
UNUSED(data);
PSCThreadData cur_data = NULL; PSCThreadData cur_data = NULL;
while (1) while (1)
{ {

View File

@ -56,6 +56,7 @@ seamless_get_token(char **s)
static RD_BOOL static RD_BOOL
seamless_process_line(const char *line, void *data) seamless_process_line(const char *line, void *data)
{ {
UNUSED(data);
char *p, *l; char *p, *l;
char *tok1, *tok3, *tok4, *tok5, *tok6, *tok7, *tok8; char *tok1, *tok3, *tok4, *tok5, *tok6, *tok7, *tok8;
unsigned long id, flags; unsigned long id, flags;

View File

@ -552,6 +552,11 @@ static RD_NTSTATUS
serial_create(uint32 device_id, uint32 access, uint32 share_mode, uint32 disposition, serial_create(uint32 device_id, uint32 access, uint32 share_mode, uint32 disposition,
uint32 flags_and_attributes, char *filename, RD_NTHANDLE * handle) uint32 flags_and_attributes, char *filename, RD_NTHANDLE * handle)
{ {
UNUSED(access);
UNUSED(share_mode);
UNUSED(disposition);
UNUSED(flags_and_attributes);
UNUSED(filename);
RD_NTHANDLE serial_fd; RD_NTHANDLE serial_fd;
SERIAL_DEVICE *pser_inf; SERIAL_DEVICE *pser_inf;
@ -625,6 +630,7 @@ serial_close(RD_NTHANDLE handle)
static RD_NTSTATUS static RD_NTSTATUS
serial_read(RD_NTHANDLE handle, uint8 * data, uint32 length, uint32 offset, uint32 * result) serial_read(RD_NTHANDLE handle, uint8 * data, uint32 length, uint32 offset, uint32 * result)
{ {
UNUSED(offset);
long timeout; long timeout;
SERIAL_DEVICE *pser_inf; SERIAL_DEVICE *pser_inf;
struct termios *ptermios; struct termios *ptermios;
@ -680,6 +686,7 @@ serial_read(RD_NTHANDLE handle, uint8 * data, uint32 length, uint32 offset, uint
static RD_NTSTATUS static RD_NTSTATUS
serial_write(RD_NTHANDLE handle, uint8 * data, uint32 length, uint32 offset, uint32 * result) serial_write(RD_NTHANDLE handle, uint8 * data, uint32 length, uint32 offset, uint32 * result)
{ {
UNUSED(offset);
SERIAL_DEVICE *pser_inf; SERIAL_DEVICE *pser_inf;
/* FIXME: offset is not used ? */ /* FIXME: offset is not used ? */

8
ssl.c
View File

@ -251,6 +251,8 @@ rdssl_cert_to_rkey(RDSSL_CERT * cert, uint32 * key_len)
RD_BOOL RD_BOOL
rdssl_certs_ok(RDSSL_CERT * server_cert, RDSSL_CERT * cacert) rdssl_certs_ok(RDSSL_CERT * server_cert, RDSSL_CERT * cacert)
{ {
UNUSED(server_cert);
UNUSED(cacert);
/* Currently, we don't use the CA Certificate. /* Currently, we don't use the CA Certificate.
FIXME: FIXME:
*) Verify the server certificate (server_cert) with the *) Verify the server certificate (server_cert) with the
@ -308,6 +310,12 @@ RD_BOOL
rdssl_sig_ok(uint8 * exponent, uint32 exp_len, uint8 * modulus, uint32 mod_len, rdssl_sig_ok(uint8 * exponent, uint32 exp_len, uint8 * modulus, uint32 mod_len,
uint8 * signature, uint32 sig_len) uint8 * signature, uint32 sig_len)
{ {
UNUSED(exponent);
UNUSED(exp_len);
UNUSED(modulus);
UNUSED(mod_len);
UNUSED(signature);
UNUSED(sig_len);
/* Currently, we don't check the signature /* Currently, we don't check the signature
FIXME: FIXME:
*/ */