Merge pull request #179 from hean01-cendio/build_warnings
Remove a bunch of compiler warnings
This commit is contained in:
commit
ba568443e1
1
bitmap.c
1
bitmap.c
@ -749,6 +749,7 @@ bitmap_decompress3(uint8 * output, int width, int height, uint8 * input, int siz
|
||||
static int
|
||||
process_plane(uint8 * in, int width, int height, uint8 * out, int size)
|
||||
{
|
||||
UNUSED(size);
|
||||
int indexw;
|
||||
int indexh;
|
||||
int code;
|
||||
|
@ -69,6 +69,7 @@ channel_register(char *name, uint32 flags, void (*callback) (STREAM))
|
||||
STREAM
|
||||
channel_init(VCHANNEL * channel, uint32 length)
|
||||
{
|
||||
UNUSED(channel);
|
||||
STREAM s;
|
||||
|
||||
s = sec_init(g_encryption ? SEC_ENCRYPT : 0, length + 8);
|
||||
|
@ -6,7 +6,7 @@ AC_CANONICAL_HOST
|
||||
|
||||
AC_PROG_CC
|
||||
if test "$GCC" = yes; then
|
||||
CFLAGS="$CFLAGS -Wall"
|
||||
CFLAGS="$CFLAGS -Wall -Wextra"
|
||||
fi
|
||||
|
||||
AC_PROG_INSTALL
|
||||
|
1
cssp.c
1
cssp.c
@ -680,6 +680,7 @@ cssp_read_tsrequest(STREAM token, STREAM pubkey)
|
||||
RD_BOOL
|
||||
cssp_connect(char *server, char *user, char *domain, char *password, STREAM s)
|
||||
{
|
||||
UNUSED(s);
|
||||
OM_uint32 actual_time;
|
||||
gss_cred_id_t cred;
|
||||
gss_buffer_desc input_tok, output_tok;
|
||||
|
1
ctrl.c
1
ctrl.c
@ -365,6 +365,7 @@ ctrl_add_fds(int *n, fd_set * rfds)
|
||||
void
|
||||
ctrl_check_fds(fd_set * rfds, fd_set * wfds)
|
||||
{
|
||||
UNUSED(wfds);
|
||||
int ns, res, offs;
|
||||
struct sockaddr_un fsaun;
|
||||
socklen_t fromlen;
|
||||
|
7
disk.c
7
disk.c
@ -349,7 +349,7 @@ static RD_NTSTATUS
|
||||
disk_create(uint32 device_id, uint32 accessmask, uint32 sharemode, uint32 create_disposition,
|
||||
uint32 flags_and_attributes, char *filename, RD_NTHANDLE * phandle)
|
||||
{
|
||||
RD_NTHANDLE handle;
|
||||
int handle;
|
||||
DIR *dirp;
|
||||
int flags, mode;
|
||||
char path[PATH_MAX];
|
||||
@ -739,6 +739,7 @@ disk_query_information(RD_NTHANDLE handle, uint32 info_class, STREAM out)
|
||||
RD_NTSTATUS
|
||||
disk_set_information(RD_NTHANDLE handle, uint32 info_class, STREAM in, STREAM out)
|
||||
{
|
||||
UNUSED(out);
|
||||
uint32 length, file_attributes, ft_high, ft_low;
|
||||
char *newname, fullpath[PATH_MAX];
|
||||
struct fileinfo *pfinfo;
|
||||
@ -1007,6 +1008,7 @@ disk_create_notify(RD_NTHANDLE handle, uint32 info_class)
|
||||
static RD_NTSTATUS
|
||||
NotifyInfo(RD_NTHANDLE handle, uint32 info_class, NOTIFY * p)
|
||||
{
|
||||
UNUSED(info_class);
|
||||
struct fileinfo *pfinfo;
|
||||
struct stat filestat;
|
||||
struct dirent *dp;
|
||||
@ -1419,6 +1421,9 @@ disk_query_directory(RD_NTHANDLE handle, uint32 info_class, char *pattern, STREA
|
||||
static RD_NTSTATUS
|
||||
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);
|
||||
if (((request >> 16) != 20) || ((request >> 16) != 9))
|
||||
return RD_STATUS_INVALID_PARAMETER;
|
||||
|
@ -246,7 +246,7 @@ ewmh_modify_state(Window wnd, int add, Atom atom1, Atom atom2)
|
||||
XEvent xevent;
|
||||
|
||||
int result;
|
||||
unsigned long nitems;
|
||||
unsigned long i, nitems;
|
||||
unsigned char *props;
|
||||
uint32 state = WithdrawnState;
|
||||
|
||||
@ -281,7 +281,6 @@ ewmh_modify_state(Window wnd, int add, Atom atom1, Atom atom2)
|
||||
else
|
||||
{
|
||||
Atom *atoms;
|
||||
int i;
|
||||
|
||||
if (get_property_value(wnd, "_NET_WM_STATE", 64, &nitems, &props, 1) < 0)
|
||||
return 0;
|
||||
@ -438,7 +437,7 @@ ewmh_set_window_modal(Window wnd)
|
||||
}
|
||||
|
||||
void
|
||||
ewmh_set_icon(Window wnd, int width, int height, const char *rgba_data)
|
||||
ewmh_set_icon(Window wnd, uint32 width, uint32 height, const char *rgba_data)
|
||||
{
|
||||
unsigned long nitems, i;
|
||||
unsigned char *props;
|
||||
@ -481,7 +480,7 @@ ewmh_set_icon(Window wnd, int width, int height, const char *rgba_data)
|
||||
icon[1] = height;
|
||||
|
||||
/* Convert RGBA -> ARGB */
|
||||
for (i = 0; i < width * height; i++)
|
||||
for (i = 0; i < (width * height); i++)
|
||||
{
|
||||
icon[i + 2] =
|
||||
rgba_data[i * 4 + 3] << 24 |
|
||||
@ -500,7 +499,7 @@ ewmh_set_icon(Window wnd, int width, int height, const char *rgba_data)
|
||||
}
|
||||
|
||||
void
|
||||
ewmh_del_icon(Window wnd, int width, int height)
|
||||
ewmh_del_icon(Window wnd, uint32 width, uint32 height)
|
||||
{
|
||||
unsigned long nitems, i, icon_size;
|
||||
unsigned char *props;
|
||||
|
1
iso.c
1
iso.c
@ -204,6 +204,7 @@ RD_BOOL
|
||||
iso_connect(char *server, char *username, char *domain, char *password,
|
||||
RD_BOOL reconnect, uint32 * selected_protocol)
|
||||
{
|
||||
UNUSED(reconnect);
|
||||
STREAM s;
|
||||
uint8 code;
|
||||
uint32 neg_proto;
|
||||
|
2
lspci.c
2
lspci.c
@ -43,6 +43,7 @@ static void lspci_send(const char *output);
|
||||
static RD_BOOL
|
||||
handle_child_line(const char *line, void *data)
|
||||
{
|
||||
UNUSED(data);
|
||||
const char *val;
|
||||
char buf[1024];
|
||||
|
||||
@ -108,6 +109,7 @@ handle_child_line(const char *line, void *data)
|
||||
static RD_BOOL
|
||||
lspci_process_line(const char *line, void *data)
|
||||
{
|
||||
UNUSED(data);
|
||||
char *lspci_command[5] = { "lspci", "-m", "-n", "-v", NULL };
|
||||
|
||||
if (!strcmp(line, "LSPCI"))
|
||||
|
1
mcs.c
1
mcs.c
@ -86,6 +86,7 @@ mcs_send_connect_initial(STREAM mcs_data)
|
||||
static RD_BOOL
|
||||
mcs_recv_connect_response(STREAM mcs_data)
|
||||
{
|
||||
UNUSED(mcs_data);
|
||||
uint8 result;
|
||||
int length;
|
||||
STREAM s;
|
||||
|
2
orders.c
2
orders.c
@ -826,6 +826,7 @@ process_ellipse2(STREAM s, ELLIPSE2_ORDER * os, uint32 present, RD_BOOL delta)
|
||||
static void
|
||||
process_text2(STREAM s, TEXT2_ORDER * os, uint32 present, RD_BOOL delta)
|
||||
{
|
||||
UNUSED(delta);
|
||||
BRUSH brush;
|
||||
|
||||
if (present & 0x000001)
|
||||
@ -1175,6 +1176,7 @@ process_compressed_8x8_brush_data(uint8 * in, uint8 * out, int Bpp)
|
||||
static void
|
||||
process_brushcache(STREAM s, uint16 flags)
|
||||
{
|
||||
UNUSED(flags);
|
||||
BRUSHDATA brush_data;
|
||||
uint8 cache_idx, colour_code, width, height, size, type;
|
||||
uint8 *comp_brush;
|
||||
|
10
parallel.c
10
parallel.c
@ -78,6 +78,11 @@ static RD_NTSTATUS
|
||||
parallel_create(uint32 device_id, uint32 access, uint32 share_mode, uint32 disposition,
|
||||
uint32 flags, char *filename, RD_NTHANDLE * handle)
|
||||
{
|
||||
UNUSED(access);
|
||||
UNUSED(share_mode);
|
||||
UNUSED(disposition);
|
||||
UNUSED(flags);
|
||||
UNUSED(filename);
|
||||
int parallel_fd;
|
||||
|
||||
parallel_fd = open(g_rdpdr_device[device_id].local_path, O_RDWR);
|
||||
@ -116,6 +121,7 @@ parallel_close(RD_NTHANDLE handle)
|
||||
static RD_NTSTATUS
|
||||
parallel_read(RD_NTHANDLE handle, uint8 * data, uint32 length, uint32 offset, uint32 * result)
|
||||
{
|
||||
UNUSED(offset);
|
||||
*result = read(handle, data, length);
|
||||
return RD_STATUS_SUCCESS;
|
||||
}
|
||||
@ -123,6 +129,7 @@ parallel_read(RD_NTHANDLE handle, uint8 * data, uint32 length, uint32 offset, ui
|
||||
static RD_NTSTATUS
|
||||
parallel_write(RD_NTHANDLE handle, uint8 * data, uint32 length, uint32 offset, uint32 * result)
|
||||
{
|
||||
UNUSED(offset);
|
||||
int rc = RD_STATUS_SUCCESS;
|
||||
|
||||
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
|
||||
parallel_device_control(RD_NTHANDLE handle, uint32 request, STREAM in, STREAM out)
|
||||
{
|
||||
UNUSED(handle);
|
||||
UNUSED(in);
|
||||
UNUSED(out);
|
||||
if ((request >> 16) != FILE_DEVICE_PARALLEL)
|
||||
return RD_STATUS_INVALID_PARAMETER;
|
||||
|
||||
|
@ -40,7 +40,7 @@ printer_enum_devices(uint32 * id, char *optarg)
|
||||
|
||||
char *pos = optarg;
|
||||
char *pos2;
|
||||
int count = 0;
|
||||
size_t count = 0;
|
||||
int already = 0;
|
||||
|
||||
/* we need to know how many printers we've already set up
|
||||
@ -103,6 +103,11 @@ static RD_NTSTATUS
|
||||
printer_create(uint32 device_id, uint32 access, uint32 share_mode, uint32 disposition, uint32 flags,
|
||||
char *filename, RD_NTHANDLE * handle)
|
||||
{
|
||||
UNUSED(access);
|
||||
UNUSED(share_mode);
|
||||
UNUSED(disposition);
|
||||
UNUSED(flags);
|
||||
UNUSED(filename);
|
||||
char cmd[256];
|
||||
PRINTER *pprinter_data;
|
||||
|
||||
@ -141,6 +146,7 @@ printer_close(RD_NTHANDLE handle)
|
||||
static RD_NTSTATUS
|
||||
printer_write(RD_NTHANDLE handle, uint8 * data, uint32 length, uint32 offset, uint32 * result)
|
||||
{
|
||||
UNUSED(offset);
|
||||
PRINTER *pprinter_data;
|
||||
|
||||
pprinter_data = get_printer_data(handle);
|
||||
|
20
proto.h
20
proto.h
@ -271,7 +271,7 @@ void ui_paint_bitmap(int x, int y, int cx, int cy, int width, int height, uint8
|
||||
void ui_destroy_bitmap(RD_HBITMAP bmp);
|
||||
RD_HGLYPH ui_create_glyph(int width, int height, uint8 * data);
|
||||
void ui_destroy_glyph(RD_HGLYPH glyph);
|
||||
RD_HCURSOR ui_create_cursor(unsigned int x, unsigned int y, int width, int height, uint8 * andmask,
|
||||
RD_HCURSOR ui_create_cursor(unsigned int x, unsigned int y, uint32 width, uint32 height, uint8 * andmask,
|
||||
uint8 * xormask, int bpp);
|
||||
void ui_set_cursor(RD_HCURSOR cursor);
|
||||
void ui_destroy_cursor(RD_HCURSOR cursor);
|
||||
@ -284,24 +284,24 @@ void ui_set_clip(int x, int y, int cx, int cy);
|
||||
void ui_reset_clip(void);
|
||||
void ui_bell(void);
|
||||
void ui_destblt(uint8 opcode, int x, int y, int cx, int cy);
|
||||
void ui_patblt(uint8 opcode, int x, int y, int cx, int cy, BRUSH * brush, int bgcolour,
|
||||
int fgcolour);
|
||||
void ui_patblt(uint8 opcode, int x, int y, int cx, int cy, BRUSH * brush, uint32 bgcolour,
|
||||
uint32 fgcolour);
|
||||
void ui_screenblt(uint8 opcode, int x, int y, int cx, int cy, int srcx, int srcy);
|
||||
void ui_memblt(uint8 opcode, int x, int y, int cx, int cy, RD_HBITMAP src, int srcx, int srcy);
|
||||
void ui_triblt(uint8 opcode, int x, int y, int cx, int cy, RD_HBITMAP src, int srcx, int srcy,
|
||||
BRUSH * brush, int bgcolour, int fgcolour);
|
||||
BRUSH * brush, uint32 bgcolour, uint32 fgcolour);
|
||||
void ui_line(uint8 opcode, int startx, int starty, int endx, int endy, PEN * pen);
|
||||
void ui_rect(int x, int y, int cx, int cy, int colour);
|
||||
void ui_rect(int x, int y, int cx, int cy, uint32 colour);
|
||||
void ui_polygon(uint8 opcode, uint8 fillmode, RD_POINT * point, int npoints, BRUSH * brush,
|
||||
int bgcolour, int fgcolour);
|
||||
uint32 bgcolour, uint32 fgcolour);
|
||||
void ui_polyline(uint8 opcode, RD_POINT * points, int npoints, PEN * pen);
|
||||
void ui_ellipse(uint8 opcode, uint8 fillmode, int x, int y, int cx, int cy, BRUSH * brush,
|
||||
int bgcolour, int fgcolour);
|
||||
uint32 bgcolour, uint32 fgcolour);
|
||||
void ui_draw_glyph(int mixmode, int x, int y, int cx, int cy, RD_HGLYPH glyph, int srcx, int srcy,
|
||||
int bgcolour, int fgcolour);
|
||||
uint32 bgcolour, uint32 fgcolour);
|
||||
void ui_draw_text(uint8 font, uint8 flags, uint8 opcode, int mixmode, int x, int y, int clipx,
|
||||
int clipy, int clipcx, int clipcy, int boxx, int boxy, int boxcx, int boxcy,
|
||||
BRUSH * brush, int bgcolour, int fgcolour, uint8 * text, uint8 length);
|
||||
BRUSH * brush, uint32 bgcolour, uint32 fgcolour, uint8 * text, uint8 length);
|
||||
void ui_desktop_save(uint32 offset, int x, int y, int cx, int cy);
|
||||
void ui_desktop_restore(uint32 offset, int x, int y, int cx, int cy);
|
||||
void ui_begin_update(void);
|
||||
@ -316,7 +316,7 @@ void ui_seamless_create_window(unsigned long id, unsigned long group, unsigned l
|
||||
void ui_seamless_destroy_window(unsigned long id, unsigned long flags);
|
||||
void ui_seamless_destroy_group(unsigned long id, unsigned long flags);
|
||||
void ui_seamless_seticon(unsigned long id, const char *format, int width, int height, int chunk,
|
||||
const char *data, int chunk_len);
|
||||
const char *data, size_t chunk_len);
|
||||
void ui_seamless_delicon(unsigned long id, const char *format, int width, int height);
|
||||
void ui_seamless_move_window(unsigned long id, int x, int y, int width, int height,
|
||||
unsigned long flags);
|
||||
|
12
rdpdr.c
12
rdpdr.c
@ -123,7 +123,7 @@ convert_to_unix_filename(char *filename)
|
||||
}
|
||||
|
||||
static RD_BOOL
|
||||
rdpdr_handle_ok(int device, int handle)
|
||||
rdpdr_handle_ok(uint32 device, RD_NTHANDLE handle)
|
||||
{
|
||||
switch (g_rdpdr_device[device].device_type)
|
||||
{
|
||||
@ -234,10 +234,10 @@ rdpdr_send_client_name_request(void)
|
||||
}
|
||||
|
||||
/* Returns the size of the payload of the announce packet */
|
||||
static int
|
||||
static size_t
|
||||
announcedata_size()
|
||||
{
|
||||
int size, i;
|
||||
size_t size, i;
|
||||
PRINTER *printerinfo;
|
||||
DISK_DEVICE *diskinfo;
|
||||
|
||||
@ -280,7 +280,7 @@ rdpdr_send_client_device_list_announce(void)
|
||||
{
|
||||
/* DR_CORE_CLIENT_ANNOUNCE_RSP */
|
||||
uint32 bloblen, disklen, flags;
|
||||
int i;
|
||||
size_t i;
|
||||
STREAM s;
|
||||
PRINTER *printerinfo;
|
||||
DISK_DEVICE *diskinfo;
|
||||
@ -947,7 +947,7 @@ rdpdr_add_fds(int *n, fd_set * rfds, fd_set * wfds, struct timeval *tv, RD_BOOL
|
||||
support for reconnects. */
|
||||
|
||||
FD_SET(iorq->fd, rfds);
|
||||
*n = MAX(*n, iorq->fd);
|
||||
*n = MAX(*n, (int)iorq->fd);
|
||||
|
||||
/* Check if io request timeout is smaller than current (but not 0). */
|
||||
if (iorq->timeout
|
||||
@ -982,7 +982,7 @@ rdpdr_add_fds(int *n, fd_set * rfds, fd_set * wfds, struct timeval *tv, RD_BOOL
|
||||
break;
|
||||
|
||||
FD_SET(iorq->fd, wfds);
|
||||
*n = MAX(*n, iorq->fd);
|
||||
*n = MAX(*n, (int)iorq->fd);
|
||||
break;
|
||||
|
||||
case IRP_MJ_DEVICE_CONTROL:
|
||||
|
3
rdpsnd.c
3
rdpsnd.c
@ -110,6 +110,8 @@ rdpsnd_send_waveconfirm(uint16 tick, uint8 packet_index)
|
||||
void
|
||||
rdpsnd_record(const void *data, unsigned int size)
|
||||
{
|
||||
UNUSED(data);
|
||||
UNUSED(size);
|
||||
/* TODO: Send audio over RDP */
|
||||
}
|
||||
|
||||
@ -430,6 +432,7 @@ rdpsnd_process(STREAM s)
|
||||
static RD_BOOL
|
||||
rdpsnddbg_line_handler(const char *line, void *data)
|
||||
{
|
||||
UNUSED(data);
|
||||
logger(Sound, Debug, "rdpsnddbg_line_handler(), \"%s\"", line);
|
||||
return True;
|
||||
}
|
||||
|
@ -33,10 +33,10 @@
|
||||
#define MAX_FRAMES 32
|
||||
|
||||
static struct pollfd pfds_out[32];
|
||||
static int num_fds_out;
|
||||
static size_t num_fds_out;
|
||||
|
||||
static struct pollfd pfds_in[32];
|
||||
static int num_fds_in;
|
||||
static size_t num_fds_in;
|
||||
|
||||
static snd_pcm_t *out_handle = NULL;
|
||||
static snd_pcm_t *in_handle = NULL;
|
||||
@ -59,6 +59,7 @@ void alsa_record(void);
|
||||
void
|
||||
alsa_add_fds(int *n, fd_set * rfds, fd_set * wfds, struct timeval *tv)
|
||||
{
|
||||
UNUSED(tv);
|
||||
int err;
|
||||
struct pollfd *f;
|
||||
|
||||
@ -358,7 +359,7 @@ alsa_play(void)
|
||||
STREAM out;
|
||||
int len;
|
||||
static long prev_s, prev_us;
|
||||
unsigned int duration;
|
||||
int duration;
|
||||
struct timeval tv;
|
||||
int next_tick;
|
||||
|
||||
|
@ -179,6 +179,7 @@ uint32
|
||||
rdpsnd_dsp_resample(unsigned char **out, unsigned char *in, unsigned int size,
|
||||
RD_WAVEFORMATEX * format, RD_BOOL stream_be)
|
||||
{
|
||||
UNUSED(stream_be);
|
||||
#ifdef HAVE_LIBSAMPLERATE
|
||||
SRC_DATA resample_data;
|
||||
float *infloat, *outfloat;
|
||||
|
@ -71,6 +71,7 @@ static RD_BOOL oss_set_format(RD_WAVEFORMATEX * pwfx);
|
||||
static void
|
||||
oss_add_fds(int *n, fd_set * rfds, fd_set * wfds, struct timeval *tv)
|
||||
{
|
||||
UNUSED(tv);
|
||||
if (dsp_fd == -1)
|
||||
return;
|
||||
|
||||
|
65
scard.c
65
scard.c
@ -99,24 +99,43 @@ static RD_NTSTATUS
|
||||
scard_create(uint32 device_id, uint32 accessmask, uint32 sharemode, uint32 create_disposition,
|
||||
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
|
||||
scard_close(RD_NTHANDLE handle)
|
||||
{
|
||||
UNUSED(handle);
|
||||
return RD_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
static RD_NTSTATUS
|
||||
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;
|
||||
}
|
||||
|
||||
static RD_NTSTATUS
|
||||
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;
|
||||
}
|
||||
|
||||
@ -518,7 +537,7 @@ outBufferStart(STREAM out, int length)
|
||||
static void
|
||||
outBufferFinishWithLimit(STREAM out, char *buffer, unsigned int length, unsigned int highLimit)
|
||||
{
|
||||
int header = (length < 0) ? (0) : ((length > highLimit) ? (highLimit) : (length));
|
||||
unsigned int header = (length > highLimit) ? (highLimit) : (length);
|
||||
out_uint32_le(out, header);
|
||||
|
||||
if (length <= 0)
|
||||
@ -560,7 +579,7 @@ inString(PMEM_HANDLE * handle, STREAM in, char **destination, SERVER_DWORD dataL
|
||||
|
||||
if (wide)
|
||||
{
|
||||
int i;
|
||||
unsigned int i;
|
||||
in_uint8a(in, buffer, 2 * dataLength);
|
||||
for (i = 0; i < dataLength; i++)
|
||||
if ((buffer[2 * i] < 0) || (buffer[2 * i + 1] != 0))
|
||||
@ -594,7 +613,7 @@ outString(STREAM out, char *source, RD_BOOL wide)
|
||||
|
||||
if (wide)
|
||||
{
|
||||
int i;
|
||||
unsigned int i;
|
||||
char *buffer = SC_xmalloc(&lcHandle, Result);
|
||||
|
||||
for (i = 0; i < dataLength; i++)
|
||||
@ -644,6 +663,7 @@ inSkipLinked(STREAM in)
|
||||
static MYPCSC_DWORD
|
||||
SC_returnCode(MYPCSC_DWORD rc, PMEM_HANDLE * handle, STREAM in, STREAM out)
|
||||
{
|
||||
UNUSED(in);
|
||||
SC_xfreeallmemory(handle);
|
||||
out_uint8s(out, 256);
|
||||
return rc;
|
||||
@ -658,6 +678,7 @@ SC_returnNoMemoryError(PMEM_HANDLE * handle, STREAM in, STREAM out)
|
||||
static MYPCSC_DWORD
|
||||
TS_SCardEstablishContext(STREAM in, STREAM out)
|
||||
{
|
||||
UNUSED(in);
|
||||
MYPCSC_DWORD rv;
|
||||
MYPCSC_SCARDCONTEXT myHContext;
|
||||
SERVER_SCARDCONTEXT hContext;
|
||||
@ -1299,7 +1320,7 @@ TS_SCardCancel(STREAM in, STREAM out)
|
||||
static MYPCSC_DWORD
|
||||
TS_SCardLocateCardsByATR(STREAM in, STREAM out, RD_BOOL wide)
|
||||
{
|
||||
int i, j, k;
|
||||
unsigned int i, j, k;
|
||||
MYPCSC_DWORD rv;
|
||||
SERVER_SCARDCONTEXT hContext;
|
||||
MYPCSC_SCARDCONTEXT myHContext;
|
||||
@ -1731,9 +1752,9 @@ TS_SCardStatus(STREAM in, STREAM out, RD_BOOL wide)
|
||||
"TS_SCardStatus(), hcard: 0x%08x [0x%08lx], reader len: %d bytes, atr len: %d bytes",
|
||||
(unsigned) hCard, (unsigned long) myHCard, (int) dwReaderLen, (int) dwAtrLen);
|
||||
|
||||
if (dwReaderLen <= 0 || dwReaderLen == SCARD_AUTOALLOCATE || dwReaderLen > SCARD_MAX_MEM)
|
||||
if (dwReaderLen == 0 || dwReaderLen == (SERVER_DWORD)SCARD_AUTOALLOCATE || dwReaderLen > SCARD_MAX_MEM)
|
||||
dwReaderLen = SCARD_MAX_MEM;
|
||||
if (dwAtrLen <= 0 || dwAtrLen == SCARD_AUTOALLOCATE || dwAtrLen > SCARD_MAX_MEM)
|
||||
if (dwAtrLen == 0 || dwAtrLen == (SERVER_DWORD)SCARD_AUTOALLOCATE || dwAtrLen > SCARD_MAX_MEM)
|
||||
dwAtrLen = SCARD_MAX_MEM;
|
||||
|
||||
#if 1
|
||||
@ -1848,7 +1869,7 @@ TS_SCardState(STREAM in, STREAM out)
|
||||
(unsigned) hCard, (unsigned long) myHCard, (int) dwAtrLen);
|
||||
|
||||
dwReaderLen = SCARD_MAX_MEM;
|
||||
if (dwAtrLen <= 0 || dwAtrLen == SCARD_AUTOALLOCATE || dwAtrLen > SCARD_MAX_MEM)
|
||||
if (dwAtrLen <= 0 || dwAtrLen == (SERVER_DWORD)SCARD_AUTOALLOCATE || dwAtrLen > SCARD_MAX_MEM)
|
||||
dwAtrLen = SCARD_MAX_MEM;
|
||||
|
||||
readerName = SC_xmalloc(&lcHandle, dwReaderLen + 2);
|
||||
@ -2007,22 +2028,17 @@ TS_SCardGetAttrib(STREAM in, STREAM out)
|
||||
"TS_SCardGetAttrib(), hcard: 0x%08x [0x%08lx], attrib: 0x%08x (%d bytes)",
|
||||
(unsigned) hCard, (unsigned long) myHCard, (unsigned) dwAttrId, (int) dwAttrLen);
|
||||
|
||||
if (dwAttrLen > MAX_BUFFER_SIZE)
|
||||
pbAttr = NULL;
|
||||
if (dwAttrLen != (SERVER_DWORD)SCARD_AUTOALLOCATE)
|
||||
{
|
||||
if (dwAttrLen > MAX_BUFFER_SIZE)
|
||||
{
|
||||
dwAttrLen = MAX_BUFFER_SIZE;
|
||||
}
|
||||
|
||||
|
||||
if (dwAttrLen > SCARD_AUTOALLOCATE)
|
||||
pbAttr = NULL;
|
||||
else if ((dwAttrLen < 0) || (dwAttrLen > SCARD_MAX_MEM))
|
||||
{
|
||||
dwAttrLen = (SERVER_DWORD) SCARD_AUTOALLOCATE;
|
||||
pbAttr = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
pbAttr = SC_xmalloc(&lcHandle, dwAttrLen);
|
||||
if (!pbAttr)
|
||||
return SC_returnNoMemoryError(&lcHandle, in, out);
|
||||
pbAttr = SC_xmalloc(&lcHandle, dwAttrLen);
|
||||
if (!pbAttr)
|
||||
return SC_returnNoMemoryError(&lcHandle, in, out);
|
||||
}
|
||||
|
||||
attrLen = dwAttrLen;
|
||||
@ -2223,7 +2239,7 @@ TS_SCardControl(STREAM in, STREAM out)
|
||||
#ifdef PCSCLITE_VERSION_NUMBER
|
||||
if (dwControlCode == SCARD_CTL_CODE(3400))
|
||||
{
|
||||
int i;
|
||||
unsigned int i;
|
||||
SERVER_DWORD cc;
|
||||
|
||||
for (i = 0; i < nBytesReturned / 6; i++)
|
||||
@ -2255,6 +2271,7 @@ TS_SCardControl(STREAM in, STREAM out)
|
||||
static MYPCSC_DWORD
|
||||
TS_SCardAccessStartedEvent(STREAM in, STREAM out)
|
||||
{
|
||||
UNUSED(in);
|
||||
logger(SmartCard, Debug, "TS_SCardAccessStartedEvent()");
|
||||
out_uint8s(out, 8);
|
||||
return SCARD_S_SUCCESS;
|
||||
@ -2264,6 +2281,7 @@ TS_SCardAccessStartedEvent(STREAM in, STREAM out)
|
||||
static RD_NTSTATUS
|
||||
scard_device_control(RD_NTHANDLE handle, uint32 request, STREAM in, STREAM out)
|
||||
{
|
||||
UNUSED(handle);
|
||||
SERVER_DWORD Result = 0x00000000;
|
||||
unsigned char *psize, *pend, *pStatusCode;
|
||||
SERVER_DWORD addToEnd = 0;
|
||||
@ -2652,6 +2670,7 @@ SC_handleRequest(PSCThreadData data)
|
||||
static void *
|
||||
queue_handler_function(void *data)
|
||||
{
|
||||
UNUSED(data);
|
||||
PSCThreadData cur_data = NULL;
|
||||
while (1)
|
||||
{
|
||||
|
@ -56,6 +56,7 @@ seamless_get_token(char **s)
|
||||
static RD_BOOL
|
||||
seamless_process_line(const char *line, void *data)
|
||||
{
|
||||
UNUSED(data);
|
||||
char *p, *l;
|
||||
char *tok1, *tok3, *tok4, *tok5, *tok6, *tok7, *tok8;
|
||||
unsigned long id, flags;
|
||||
|
11
serial.c
11
serial.c
@ -552,12 +552,17 @@ static RD_NTSTATUS
|
||||
serial_create(uint32 device_id, uint32 access, uint32 share_mode, uint32 disposition,
|
||||
uint32 flags_and_attributes, char *filename, RD_NTHANDLE * handle)
|
||||
{
|
||||
RD_NTHANDLE serial_fd;
|
||||
UNUSED(access);
|
||||
UNUSED(share_mode);
|
||||
UNUSED(disposition);
|
||||
UNUSED(flags_and_attributes);
|
||||
UNUSED(filename);
|
||||
int serial_fd;
|
||||
SERIAL_DEVICE *pser_inf;
|
||||
|
||||
pser_inf = (SERIAL_DEVICE *) g_rdpdr_device[device_id].pdevice_data;
|
||||
serial_fd = open(g_rdpdr_device[device_id].local_path, O_RDWR | O_NOCTTY | O_NONBLOCK);
|
||||
|
||||
serial_fd = open(g_rdpdr_device[device_id].local_path, O_RDWR | O_NOCTTY | O_NONBLOCK);
|
||||
if (serial_fd == -1)
|
||||
{
|
||||
logger(Core, Error, "serial_create(), open '%s' failed: %s",
|
||||
@ -625,6 +630,7 @@ serial_close(RD_NTHANDLE handle)
|
||||
static RD_NTSTATUS
|
||||
serial_read(RD_NTHANDLE handle, uint8 * data, uint32 length, uint32 offset, uint32 * result)
|
||||
{
|
||||
UNUSED(offset);
|
||||
long timeout;
|
||||
SERIAL_DEVICE *pser_inf;
|
||||
struct termios *ptermios;
|
||||
@ -680,6 +686,7 @@ serial_read(RD_NTHANDLE handle, uint8 * data, uint32 length, uint32 offset, uint
|
||||
static RD_NTSTATUS
|
||||
serial_write(RD_NTHANDLE handle, uint8 * data, uint32 length, uint32 offset, uint32 * result)
|
||||
{
|
||||
UNUSED(offset);
|
||||
SERIAL_DEVICE *pser_inf;
|
||||
|
||||
/* FIXME: offset is not used ? */
|
||||
|
8
ssl.c
8
ssl.c
@ -251,6 +251,8 @@ rdssl_cert_to_rkey(RDSSL_CERT * cert, uint32 * key_len)
|
||||
RD_BOOL
|
||||
rdssl_certs_ok(RDSSL_CERT * server_cert, RDSSL_CERT * cacert)
|
||||
{
|
||||
UNUSED(server_cert);
|
||||
UNUSED(cacert);
|
||||
/* Currently, we don't use the CA Certificate.
|
||||
FIXME:
|
||||
*) 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,
|
||||
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
|
||||
FIXME:
|
||||
*/
|
||||
|
5
stream.c
5
stream.c
@ -97,7 +97,7 @@ _out_utf16s(STREAM s, size_t maxlength, const char *string)
|
||||
}
|
||||
|
||||
ibl = strlen(string);
|
||||
obl = maxlength ? maxlength : s_left(s);
|
||||
obl = maxlength ? maxlength : (size_t)s_left(s);
|
||||
pin = string;
|
||||
pout = (char *) s->p;
|
||||
|
||||
@ -122,8 +122,7 @@ _out_utf16s(STREAM s, size_t maxlength, const char *string)
|
||||
void
|
||||
out_utf16s_padded(STREAM s, const char *string, size_t length, unsigned char pad)
|
||||
{
|
||||
int i;
|
||||
size_t bl;
|
||||
size_t i, bl;
|
||||
bl = _out_utf16s(s, length - 2, string);
|
||||
|
||||
// append utf16 null termination
|
||||
|
7
utils.c
7
utils.c
@ -77,7 +77,8 @@ utils_string_escape(const char *str)
|
||||
char *
|
||||
utils_string_unescape(const char *str)
|
||||
{
|
||||
char *ns, *ps, *pd, c;
|
||||
char *ns, *ps, *pd;
|
||||
unsigned char c;
|
||||
|
||||
ns = xmalloc(strlen(str) + 1);
|
||||
memcpy(ns, str, strlen(str) + 1);
|
||||
@ -90,7 +91,7 @@ utils_string_unescape(const char *str)
|
||||
{
|
||||
if (sscanf(ps, "%%%2hhX", &c) == 1)
|
||||
{
|
||||
pd[0] = c;
|
||||
pd[0] = (char)c;
|
||||
ps += 3;
|
||||
pd++;
|
||||
continue;
|
||||
@ -247,7 +248,7 @@ static char *subject[] = {
|
||||
|
||||
static log_level_t _logger_level = Warning;
|
||||
|
||||
#define DEFAULT_LOGGER_SUBJECTS (1 << Core);
|
||||
#define DEFAULT_LOGGER_SUBJECTS (1 << Core)
|
||||
|
||||
#define ALL_LOGGER_SUBJECTS \
|
||||
(1 << GUI) \
|
||||
|
4
xclip.c
4
xclip.c
@ -506,11 +506,11 @@ xclip_probe_selections()
|
||||
void
|
||||
xclip_handle_SelectionNotify(XSelectionEvent * event)
|
||||
{
|
||||
unsigned long nitems, bytes_left;
|
||||
unsigned long i, nitems, bytes_left;
|
||||
XWindowAttributes wa;
|
||||
Atom type;
|
||||
Atom *supported_targets;
|
||||
int res, i, format;
|
||||
int res, format;
|
||||
uint8 *data = NULL;
|
||||
|
||||
if (event->property == None)
|
||||
|
28
xwin.c
28
xwin.c
@ -2973,17 +2973,17 @@ xcursor_stencil(XcursorImage * src, XcursorImage * dst, int dx, int dy, uint32 a
|
||||
assert(src->width == dst->width);
|
||||
assert(src->height == dst->height);
|
||||
|
||||
for (y = 0; y < src->height; y++)
|
||||
for (y = 0; y < (int)src->height; y++)
|
||||
{
|
||||
for (x = 0; x < src->width; x++)
|
||||
for (x = 0; x < (int)src->width; x++)
|
||||
{
|
||||
si = y * src->width + x;
|
||||
if (!src->pixels[si])
|
||||
continue;
|
||||
|
||||
if ((y + dy) < 0 || (y + dy) >= dst->height)
|
||||
if ((y + dy) < 0 || (y + dy) >= (int)dst->height)
|
||||
continue;
|
||||
if ((x + dx) < 0 || (x + dx) >= dst->width)
|
||||
if ((x + dx) < 0 || (x + dx) >= (int)dst->width)
|
||||
continue;
|
||||
di = (y + dy) * src->width + (x + dx);
|
||||
dst->pixels[di] = argb;
|
||||
@ -3006,8 +3006,8 @@ xcursor_merge(XcursorImage * src, XcursorImage * dst)
|
||||
}
|
||||
|
||||
RD_HCURSOR
|
||||
ui_create_cursor(unsigned int xhot, unsigned int yhot, int width,
|
||||
int height, uint8 * andmask, uint8 * xormask, int bpp)
|
||||
ui_create_cursor(unsigned int xhot, unsigned int yhot, uint32 width,
|
||||
uint32 height, uint8 * andmask, uint8 * xormask, int bpp)
|
||||
{
|
||||
Cursor cursor;
|
||||
XcursorPixel *out;
|
||||
@ -3294,7 +3294,7 @@ static uint8 hatch_patterns[] = {
|
||||
void
|
||||
ui_patblt(uint8 opcode,
|
||||
/* dest */ int x, int y, int cx, int cy,
|
||||
/* brush */ BRUSH * brush, int bgcolour, int fgcolour)
|
||||
/* brush */ BRUSH * brush, uint32 bgcolour, uint32 fgcolour)
|
||||
{
|
||||
Pixmap fill;
|
||||
uint8 i, ipattern[8];
|
||||
@ -3421,7 +3421,7 @@ void
|
||||
ui_triblt(uint8 opcode,
|
||||
/* dest */ int x, int y, int cx, int cy,
|
||||
/* src */ RD_HBITMAP src, int srcx, int srcy,
|
||||
/* brush */ BRUSH * brush, int bgcolour, int fgcolour)
|
||||
/* brush */ BRUSH * brush, uint32 bgcolour, uint32 fgcolour)
|
||||
{
|
||||
/* This is potentially difficult to do in general. Until someone
|
||||
comes up with a more efficient way of doing it I am using cases. */
|
||||
@ -3469,7 +3469,7 @@ ui_line(uint8 opcode,
|
||||
void
|
||||
ui_rect(
|
||||
/* dest */ int x, int y, int cx, int cy,
|
||||
/* brush */ int colour)
|
||||
/* brush */ uint32 colour)
|
||||
{
|
||||
SET_FOREGROUND(colour);
|
||||
FILL_RECTANGLE(x, y, cx, cy);
|
||||
@ -3479,7 +3479,7 @@ void
|
||||
ui_polygon(uint8 opcode,
|
||||
/* mode */ uint8 fillmode,
|
||||
/* dest */ RD_POINT * point, int npoints,
|
||||
/* brush */ BRUSH * brush, int bgcolour, int fgcolour)
|
||||
/* brush */ BRUSH * brush, uint32 bgcolour, uint32 fgcolour)
|
||||
{
|
||||
uint8 style, i, ipattern[8];
|
||||
Pixmap fill;
|
||||
@ -3596,7 +3596,7 @@ void
|
||||
ui_ellipse(uint8 opcode,
|
||||
/* mode */ uint8 fillmode,
|
||||
/* dest */ int x, int y, int cx, int cy,
|
||||
/* brush */ BRUSH * brush, int bgcolour, int fgcolour)
|
||||
/* brush */ BRUSH * brush, uint32 bgcolour, uint32 fgcolour)
|
||||
{
|
||||
uint8 style, i, ipattern[8];
|
||||
Pixmap fill;
|
||||
@ -3683,7 +3683,7 @@ void
|
||||
ui_draw_glyph(int mixmode,
|
||||
/* dest */ int x, int y, int cx, int cy,
|
||||
/* src */ RD_HGLYPH glyph, int srcx, int srcy,
|
||||
int bgcolour, int fgcolour)
|
||||
uint32 bgcolour, uint32 fgcolour)
|
||||
{
|
||||
UNUSED(srcx);
|
||||
UNUSED(srcy);
|
||||
@ -3739,7 +3739,7 @@ void
|
||||
ui_draw_text(uint8 font, uint8 flags, uint8 opcode, int mixmode, int x, int y,
|
||||
int clipx, int clipy, int clipcx, int clipcy,
|
||||
int boxx, int boxy, int boxcx, int boxcy, BRUSH * brush,
|
||||
int bgcolour, int fgcolour, uint8 * text, uint8 length)
|
||||
uint32 bgcolour, uint32 fgcolour, uint8 * text, uint8 length)
|
||||
{
|
||||
UNUSED(opcode);
|
||||
UNUSED(brush);
|
||||
@ -4217,7 +4217,7 @@ ui_seamless_destroy_group(unsigned long id, unsigned long flags)
|
||||
|
||||
void
|
||||
ui_seamless_seticon(unsigned long id, const char *format, int width, int height, int chunk,
|
||||
const char *data, int chunk_len)
|
||||
const char *data, size_t chunk_len)
|
||||
{
|
||||
seamless_window *sw;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user