From 0629b25d5f406bad82f5bd0fa4894ae9667dc48e Mon Sep 17 00:00:00 2001 From: Pavel Roskin Date: Thu, 21 Apr 2016 22:27:27 -0700 Subject: [PATCH] Fix warnings about unused variables and functions --- libxrdp/xrdp_sec.c | 1 - sesman/chansrv/chansrv_fuse.c | 4 ++-- sesman/chansrv/clipboard_file.c | 2 ++ sesman/chansrv/sound.c | 2 ++ sesman/chansrv/xcommon.c | 2 ++ xup/xup.c | 4 ---- 6 files changed, 8 insertions(+), 7 deletions(-) diff --git a/libxrdp/xrdp_sec.c b/libxrdp/xrdp_sec.c index 4076699e..aae1ac87 100644 --- a/libxrdp/xrdp_sec.c +++ b/libxrdp/xrdp_sec.c @@ -1814,7 +1814,6 @@ xrdp_sec_process_mcs_data_channels(struct xrdp_sec *self, struct stream *s) { int num_channels; int index; - struct mcs_channel_item *channel_item; struct xrdp_client_info *client_info = (struct xrdp_client_info *)NULL; client_info = &(self->rdp_layer->client_info); diff --git a/sesman/chansrv/chansrv_fuse.c b/sesman/chansrv/chansrv_fuse.c index 7997dfb9..0bb9ceff 100644 --- a/sesman/chansrv/chansrv_fuse.c +++ b/sesman/chansrv/chansrv_fuse.c @@ -39,8 +39,6 @@ //#define USE_SYNC_FLAG -static char g_fuse_mount_name[256] = "xrdp_client"; - /* FUSE mount point */ char g_fuse_root_path[256] = ""; char g_fuse_clipboard_path[256] = ""; /* for clipboard use */ @@ -239,6 +237,8 @@ struct opendir_req struct fuse_file_info *fi; }; +static char g_fuse_mount_name[256] = "xrdp_client"; + FIFO g_fifo_opendir; static struct list *g_req_list = 0; diff --git a/sesman/chansrv/clipboard_file.c b/sesman/chansrv/clipboard_file.c index 4f3f1ade..52079c6c 100644 --- a/sesman/chansrv/clipboard_file.c +++ b/sesman/chansrv/clipboard_file.c @@ -102,6 +102,7 @@ static int g_file_request_sent_type = 0; #define CB_EPOCH_DIFF 11644473600LL /*****************************************************************************/ +#if 0 static tui64 APP_CC timeval2wintime(struct timeval *tv) { @@ -113,6 +114,7 @@ timeval2wintime(struct timeval *tv) result += tv->tv_usec * 10; return result; } +#endif /*****************************************************************************/ /* this will replace %20 or any hex with the space or correct char diff --git a/sesman/chansrv/sound.c b/sesman/chansrv/sound.c index a0899f67..66108651 100644 --- a/sesman/chansrv/sound.c +++ b/sesman/chansrv/sound.c @@ -103,6 +103,7 @@ static struct xr_wave_format_ex g_pcm_44100 = g_pcm_44100_data /* data */ }; +#if defined(XRDP_OPUS) static char g_opus_44100_data[] = { 0 }; static struct xr_wave_format_ex g_opus_44100 = { @@ -115,6 +116,7 @@ static struct xr_wave_format_ex g_opus_44100 = 0, /* data size */ g_opus_44100_data /* data */ }; +#endif #if defined(XRDP_OPUS) diff --git a/sesman/chansrv/xcommon.c b/sesman/chansrv/xcommon.c index d6d2d4b4..9aae4a06 100644 --- a/sesman/chansrv/xcommon.c +++ b/sesman/chansrv/xcommon.c @@ -63,11 +63,13 @@ xcommon_error_handler(Display *dis, XErrorEvent *xer) /* The X server had an internal error. This is the last function called. Do any cleanup that needs to be done on exit, like removing temporary files. Don't worry about memory leaks */ +#if 0 static int DEFAULT_CC xcommon_fatal_handler(Display *dis) { return 0; } +#endif /*****************************************************************************/ /* returns time in milliseconds diff --git a/xup/xup.c b/xup/xup.c index 1bc976ea..c93fa799 100644 --- a/xup/xup.c +++ b/xup/xup.c @@ -1151,10 +1151,6 @@ process_server_paint_rect_shmem_ex(struct mod *amod, struct stream *s) int shmem_offset; int width; int height; - int x; - int y; - int cx; - int cy; int index; int rv; tsi16 *ldrects;