summaryrefslogtreecommitdiffstats
path: root/server/tests
diff options
context:
space:
mode:
authorFabiano FidĂȘncio <fidencio@redhat.com>2014-09-01 13:24:55 +0200
committerFabiano FidĂȘncio <fidencio@redhat.com>2014-09-12 18:00:30 +0200
commit5ea7de3bccafa21963548abcb5b7061de4c59910 (patch)
treeca823bf9564db17af1b9716ac1276944ead258de /server/tests
parent94edda22553ba351c869b58cd984a79cfc6c2180 (diff)
downloadspice-5ea7de3bccafa21963548abcb5b7061de4c59910.tar.gz
spice-5ea7de3bccafa21963548abcb5b7061de4c59910.tar.xz
spice-5ea7de3bccafa21963548abcb5b7061de4c59910.zip
Fix -Wunused-parameter
Diffstat (limited to 'server/tests')
-rw-r--r--server/tests/test_display_base.c37
-rw-r--r--server/tests/test_display_no_ssl.c2
-rw-r--r--server/tests/test_display_resolution_changes.c3
-rw-r--r--server/tests/test_display_width_stride.c9
-rw-r--r--server/tests/test_empty_success.c23
-rw-r--r--server/tests/test_playback.c2
-rw-r--r--server/tests/test_vdagent.c13
7 files changed, 58 insertions, 31 deletions
diff --git a/server/tests/test_display_base.c b/server/tests/test_display_base.c
index 03798ac2..9bb29b79 100644
--- a/server/tests/test_display_base.c
+++ b/server/tests/test_display_base.c
@@ -64,7 +64,7 @@ static int rects = 16; //number of rects that will be draw
static int has_automated_tests = 0; //automated test flag
__attribute__((noreturn))
-static void sigchld_handler(int signal_num) // wait for the child process and exit
+static void sigchld_handler(SPICE_GNUC_UNUSED int signal_num) // wait for the child process and exit
{
int status;
wait(&status);
@@ -411,19 +411,22 @@ static void attache_worker(QXLInstance *qin, QXLWorker *_qxl_worker)
spice_server_vm_start(test->server);
}
-static void set_compression_level(QXLInstance *qin, int level)
+static void set_compression_level(SPICE_GNUC_UNUSED QXLInstance *qin,
+ SPICE_GNUC_UNUSED int level)
{
printf("%s\n", __func__);
}
-static void set_mm_time(QXLInstance *qin, uint32_t mm_time)
+static void set_mm_time(SPICE_GNUC_UNUSED QXLInstance *qin,
+ SPICE_GNUC_UNUSED uint32_t mm_time)
{
}
// we now have a secondary surface
#define MAX_SURFACE_NUM 2
-static void get_init_info(QXLInstance *qin, QXLDevInitInfo *info)
+static void get_init_info(SPICE_GNUC_UNUSED QXLInstance *qin,
+ QXLDevInitInfo *info)
{
memset(info, 0, sizeof(*info));
info->num_memslots = 1;
@@ -466,7 +469,8 @@ static int get_num_commands(void)
}
// called from spice_server thread (i.e. red_worker thread)
-static int get_command(QXLInstance *qin, struct QXLCommandExt *ext)
+static int get_command(SPICE_GNUC_UNUSED QXLInstance *qin,
+ struct QXLCommandExt *ext)
{
if (get_num_commands() == 0) {
return FALSE;
@@ -616,7 +620,8 @@ static void do_wakeup(void *opaque)
spice_qxl_wakeup(&test->qxl_instance);
}
-static void release_resource(QXLInstance *qin, struct QXLReleaseInfoExt release_info)
+static void release_resource(SPICE_GNUC_UNUSED QXLInstance *qin,
+ struct QXLReleaseInfoExt release_info)
{
QXLCommandExt *ext = (QXLCommandExt*)(unsigned long)release_info.info->id;
//printf("%s\n", __func__);
@@ -711,24 +716,25 @@ static int get_cursor_command(QXLInstance *qin, struct QXLCommandExt *ext)
return TRUE;
}
-static int req_cursor_notification(QXLInstance *qin)
+static int req_cursor_notification(SPICE_GNUC_UNUSED QXLInstance *qin)
{
printf("%s\n", __func__);
return TRUE;
}
-static void notify_update(QXLInstance *qin, uint32_t update_id)
+static void notify_update(SPICE_GNUC_UNUSED QXLInstance *qin,
+ SPICE_GNUC_UNUSED uint32_t update_id)
{
printf("%s\n", __func__);
}
-static int flush_resources(QXLInstance *qin)
+static int flush_resources(SPICE_GNUC_UNUSED QXLInstance *qin)
{
printf("%s\n", __func__);
return TRUE;
}
-static int client_monitors_config(QXLInstance *qin,
+static int client_monitors_config(SPICE_GNUC_UNUSED QXLInstance *qin,
VDAgentMonitorsConfig *monitors_config)
{
if (!monitors_config) {
@@ -784,19 +790,24 @@ void test_add_display_interface(Test* test)
spice_server_add_interface(test->server, &test->qxl_instance.base);
}
-static int vmc_write(SpiceCharDeviceInstance *sin, const uint8_t *buf, int len)
+static int vmc_write(SPICE_GNUC_UNUSED SpiceCharDeviceInstance *sin,
+ SPICE_GNUC_UNUSED const uint8_t *buf,
+ int len)
{
printf("%s: %d\n", __func__, len);
return len;
}
-static int vmc_read(SpiceCharDeviceInstance *sin, uint8_t *buf, int len)
+static int vmc_read(SPICE_GNUC_UNUSED SpiceCharDeviceInstance *sin,
+ SPICE_GNUC_UNUSED uint8_t *buf,
+ int len)
{
printf("%s: %d\n", __func__, len);
return 0;
}
-static void vmc_state(SpiceCharDeviceInstance *sin, int connected)
+static void vmc_state(SPICE_GNUC_UNUSED SpiceCharDeviceInstance *sin,
+ int connected)
{
printf("%s: %d\n", __func__, connected);
}
diff --git a/server/tests/test_display_no_ssl.c b/server/tests/test_display_no_ssl.c
index 83ab3dcb..89b47960 100644
--- a/server/tests/test_display_no_ssl.c
+++ b/server/tests/test_display_no_ssl.c
@@ -17,7 +17,7 @@ void show_channels(SpiceServer *server);
int ping_ms = 100;
-void pinger(void *opaque)
+void pinger(SPICE_GNUC_UNUSED void *opaque)
{
// show_channels is not thread safe - fails if disconnections / connections occur
//show_channels(server);
diff --git a/server/tests/test_display_resolution_changes.c b/server/tests/test_display_resolution_changes.c
index 4767ea9e..c4926530 100644
--- a/server/tests/test_display_resolution_changes.c
+++ b/server/tests/test_display_resolution_changes.c
@@ -22,7 +22,8 @@ void pinger(void *opaque)
test->core->timer_start(ping_timer, ping_ms);
}
-void set_primary_params(Test *test, Command *command)
+void set_primary_params(SPICE_GNUC_UNUSED Test *test,
+ Command *command)
{
#if 0
static int toggle = 0;
diff --git a/server/tests/test_display_width_stride.c b/server/tests/test_display_width_stride.c
index f9383738..a071e741 100644
--- a/server/tests/test_display_width_stride.c
+++ b/server/tests/test_display_width_stride.c
@@ -25,7 +25,8 @@ void pinger(void *opaque)
static int g_surface_id = 1;
static uint8_t *g_surface_data;
-void set_draw_parameters(Test *test, Command *command)
+void set_draw_parameters(SPICE_GNUC_UNUSED Test *test,
+ Command *command)
{
static int count = 17;
CommandDrawSolid *solid = &command->solid;
@@ -38,7 +39,8 @@ void set_draw_parameters(Test *test, Command *command)
count++;
}
-void set_surface_params(Test *test, Command *command)
+void set_surface_params(SPICE_GNUC_UNUSED Test *test,
+ Command *command)
{
CommandCreateSurface *create = &command->create_surface;
@@ -54,7 +56,8 @@ void set_surface_params(Test *test, Command *command)
create->data = g_surface_data;
}
-void set_destroy_parameters(Test *test, Command *command)
+void set_destroy_parameters(SPICE_GNUC_UNUSED Test *test,
+ SPICE_GNUC_UNUSED Command *command)
{
if (g_surface_data) {
free(g_surface_data);
diff --git a/server/tests/test_empty_success.c b/server/tests/test_empty_success.c
index 0176a52c..82436dc8 100644
--- a/server/tests/test_empty_success.c
+++ b/server/tests/test_empty_success.c
@@ -8,39 +8,46 @@ struct SpiceTimer {
int a,b;
};
-SpiceTimer* timer_add(SpiceTimerFunc func, void *opaque)
+SpiceTimer* timer_add(SPICE_GNUC_UNUSED SpiceTimerFunc func,
+ SPICE_GNUC_UNUSED void *opaque)
{
static struct SpiceTimer t = {0,};
return &t;
}
-void timer_start(SpiceTimer *timer, uint32_t ms)
+void timer_start(SPICE_GNUC_UNUSED SpiceTimer *timer,
+ SPICE_GNUC_UNUSED uint32_t ms)
{
}
-void timer_cancel(SpiceTimer *timer)
+void timer_cancel(SPICE_GNUC_UNUSED SpiceTimer *timer)
{
}
-void timer_remove(SpiceTimer *timer)
+void timer_remove(SPICE_GNUC_UNUSED SpiceTimer *timer)
{
}
-SpiceWatch *watch_add(int fd, int event_mask, SpiceWatchFunc func, void *opaque)
+SpiceWatch *watch_add(SPICE_GNUC_UNUSED int fd,
+ SPICE_GNUC_UNUSED int event_mask,
+ SPICE_GNUC_UNUSED SpiceWatchFunc func,
+ SPICE_GNUC_UNUSED void *opaque)
{
return NULL;
}
-void watch_update_mask(SpiceWatch *watch, int event_mask)
+void watch_update_mask(SPICE_GNUC_UNUSED SpiceWatch *watch,
+ SPICE_GNUC_UNUSED int event_mask)
{
}
-void watch_remove(SpiceWatch *watch)
+void watch_remove(SPICE_GNUC_UNUSED SpiceWatch *watch)
{
}
-void channel_event(int event, SpiceChannelEventInfo *info)
+void channel_event(SPICE_GNUC_UNUSED int event,
+ SPICE_GNUC_UNUSED SpiceChannelEventInfo *info)
{
}
diff --git a/server/tests/test_playback.c b/server/tests/test_playback.c
index cc7b120f..2941d4be 100644
--- a/server/tests/test_playback.c
+++ b/server/tests/test_playback.c
@@ -45,7 +45,7 @@ static void get_frame(void)
: 100;
}
-void playback_timer_cb(void *opaque)
+void playback_timer_cb(SPICE_GNUC_UNUSED void *opaque)
{
static int t = 0;
static uint64_t last_sent_usec = 0;
diff --git a/server/tests/test_vdagent.c b/server/tests/test_vdagent.c
index af331457..7a56c2a5 100644
--- a/server/tests/test_vdagent.c
+++ b/server/tests/test_vdagent.c
@@ -20,7 +20,7 @@ int ping_ms = 100;
#define MIN(a, b) ((a) > (b) ? (b) : (a))
#endif
-void pinger(void *opaque)
+void pinger(SPICE_GNUC_UNUSED void *opaque)
{
// show_channels is not thread safe - fails if disconnections / connections occur
//show_channels(server);
@@ -29,12 +29,16 @@ void pinger(void *opaque)
}
-static int vmc_write(SpiceCharDeviceInstance *sin, const uint8_t *buf, int len)
+static int vmc_write(SPICE_GNUC_UNUSED SpiceCharDeviceInstance *sin,
+ SPICE_GNUC_UNUSED const uint8_t *buf,
+ int len)
{
return len;
}
-static int vmc_read(SpiceCharDeviceInstance *sin, uint8_t *buf, int len)
+static int vmc_read(SPICE_GNUC_UNUSED SpiceCharDeviceInstance *sin,
+ uint8_t *buf,
+ int len)
{
static uint8_t c = 0;
static uint8_t message[2048];
@@ -70,7 +74,8 @@ static int vmc_read(SpiceCharDeviceInstance *sin, uint8_t *buf, int len)
return ret;
}
-static void vmc_state(SpiceCharDeviceInstance *sin, int connected)
+static void vmc_state(SPICE_GNUC_UNUSED SpiceCharDeviceInstance *sin,
+ SPICE_GNUC_UNUSED int connected)
{
}