summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabiano FidĂȘncio <fidencio@redhat.com>2014-09-01 15:06:54 +0200
committerFabiano FidĂȘncio <fidencio@redhat.com>2014-09-12 18:00:30 +0200
commit93b4f4050c57bd851292e4cee884888cee56fc31 (patch)
tree37e9a0ac56329bc9cb947ac03ea6e47449f4ae90
parentb76e561d82796bd2bccc57be962fc5fba0141da6 (diff)
Fix -Wunused-function
-rw-r--r--server/tests/test_display_base.c22
-rw-r--r--server/tests/test_vdagent.c51
2 files changed, 0 insertions, 73 deletions
diff --git a/server/tests/test_display_base.c b/server/tests/test_display_base.c
index 04dd1e82..1c909fbf 100644
--- a/server/tests/test_display_base.c
+++ b/server/tests/test_display_base.c
@@ -793,28 +793,6 @@ void test_add_display_interface(Test* test)
spice_server_add_interface(test->server, &test->qxl_instance.base);
}
-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(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(SPICE_GNUC_UNUSED SpiceCharDeviceInstance *sin,
- int connected)
-{
- printf("%s: %d\n", __func__, connected);
-}
-
static SpiceBaseInterface base = {
.type = SPICE_INTERFACE_CHAR_DEVICE,
.description = "test spice virtual channel char device",
diff --git a/server/tests/test_vdagent.c b/server/tests/test_vdagent.c
index 191ad052..22153b6f 100644
--- a/server/tests/test_vdagent.c
+++ b/server/tests/test_vdagent.c
@@ -28,57 +28,6 @@ void pinger(SPICE_GNUC_UNUSED void *opaque)
core->timer_start(ping_timer, ping_ms);
}
-
-static int vmc_write(SPICE_GNUC_UNUSED SpiceCharDeviceInstance *sin,
- SPICE_GNUC_UNUSED const uint8_t *buf,
- int len)
-{
- return 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];
- static unsigned pos = 0;
- static unsigned message_size;
- int ret;
-
- if (pos == 0) {
- VDIChunkHeader *hdr = (VDIChunkHeader *)message;
- VDAgentMessage *msg = (VDAgentMessage *)&hdr[1];
- uint8_t *p = message;
- int size = sizeof(message);
- message_size = size;
- /* fill in message */
- hdr->port = VDP_SERVER_PORT;
- hdr->size = message_size - sizeof(VDIChunkHeader);
- msg->protocol = VD_AGENT_PROTOCOL;
- msg->type = VD_AGENT_END_MESSAGE;
- msg->opaque = 0;
- msg->size = message_size - sizeof(VDIChunkHeader) - sizeof(VDAgentMessage);
- size -= sizeof(VDIChunkHeader) + sizeof(VDAgentMessage);
- p += sizeof(VDIChunkHeader) + sizeof(VDAgentMessage);
- for (; size; --size, ++p, ++c)
- *p = c;
- }
- ret = MIN(message_size - pos, len);
- memcpy(buf, &message[pos], ret);
- pos += ret;
- if (pos == message_size) {
- pos = 0;
- }
- //printf("vmc_read %d (ret %d)\n", len, ret);
- return ret;
-}
-
-static void vmc_state(SPICE_GNUC_UNUSED SpiceCharDeviceInstance *sin,
- SPICE_GNUC_UNUSED int connected)
-{
-}
-
static SpiceBaseInterface base = {
.type = SPICE_INTERFACE_CHAR_DEVICE,
.description = "test spice virtual channel char device",