[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 5/9] vnc: add missing static
From: |
Stefan Hajnoczi |
Subject: |
[Qemu-devel] [PATCH 5/9] vnc: add missing static |
Date: |
Thu, 1 Nov 2012 20:05:49 +0100 |
From: Blue Swirl <address@hidden>
Add missing 'static' qualifiers.
Signed-off-by: Blue Swirl <address@hidden>
Signed-off-by: Stefan Hajnoczi <address@hidden>
---
console.h | 2 --
ui/vnc-jobs.c | 10 +++++-----
ui/vnc-jobs.h | 1 -
ui/vnc.c | 14 +++++++-------
ui/vnc.h | 5 -----
5 files changed, 12 insertions(+), 20 deletions(-)
diff --git a/console.h b/console.h
index 6099d8d..5ad3615 100644
--- a/console.h
+++ b/console.h
@@ -377,10 +377,8 @@ void cocoa_display_init(DisplayState *ds, int full_screen);
/* vnc.c */
void vnc_display_init(DisplayState *ds);
-void vnc_display_close(DisplayState *ds);
void vnc_display_open(DisplayState *ds, const char *display, Error **errp);
void vnc_display_add_client(DisplayState *ds, int csock, int skipauth);
-int vnc_display_disable_login(DisplayState *ds);
char *vnc_display_local_addr(DisplayState *ds);
#ifdef CONFIG_VNC
int vnc_display_password(DisplayState *ds, const char *password);
diff --git a/ui/vnc-jobs.c b/ui/vnc-jobs.c
index 3c592b3..dfe482d 100644
--- a/ui/vnc-jobs.c
+++ b/ui/vnc-jobs.c
@@ -320,6 +320,11 @@ static void *vnc_worker_thread(void *arg)
return NULL;
}
+static bool vnc_worker_thread_running(void)
+{
+ return queue; /* Check global queue */
+}
+
void vnc_start_worker_thread(void)
{
VncJobQueue *q;
@@ -332,11 +337,6 @@ void vnc_start_worker_thread(void)
queue = q; /* Set global queue */
}
-bool vnc_worker_thread_running(void)
-{
- return queue; /* Check global queue */
-}
-
void vnc_stop_worker_thread(void)
{
if (!vnc_worker_thread_running())
diff --git a/ui/vnc-jobs.h b/ui/vnc-jobs.h
index 86e6d88..31da103 100644
--- a/ui/vnc-jobs.h
+++ b/ui/vnc-jobs.h
@@ -40,7 +40,6 @@ void vnc_jobs_join(VncState *vs);
void vnc_jobs_consume_buffer(VncState *vs);
void vnc_start_worker_thread(void);
-bool vnc_worker_thread_running(void);
void vnc_stop_worker_thread(void);
/* Locks */
diff --git a/ui/vnc.c b/ui/vnc.c
index d0ffcc5..d95e6ef 100644
--- a/ui/vnc.c
+++ b/ui/vnc.c
@@ -479,12 +479,12 @@ void buffer_reserve(Buffer *buffer, size_t len)
}
}
-int buffer_empty(Buffer *buffer)
+static int buffer_empty(Buffer *buffer)
{
return buffer->offset == 0;
}
-uint8_t *buffer_end(Buffer *buffer)
+static uint8_t *buffer_end(Buffer *buffer)
{
return buffer->buffer + buffer->offset;
}
@@ -1376,17 +1376,17 @@ void vnc_flush(VncState *vs)
vnc_unlock_output(vs);
}
-uint8_t read_u8(uint8_t *data, size_t offset)
+static uint8_t read_u8(uint8_t *data, size_t offset)
{
return data[offset];
}
-uint16_t read_u16(uint8_t *data, size_t offset)
+static uint16_t read_u16(uint8_t *data, size_t offset)
{
return ((data[offset] & 0xFF) << 8) | (data[offset + 1] & 0xFF);
}
-int32_t read_s32(uint8_t *data, size_t offset)
+static int32_t read_s32(uint8_t *data, size_t offset)
{
return (int32_t)((data[offset] << 24) | (data[offset + 1] << 16) |
(data[offset + 2] << 8) | data[offset + 3]);
@@ -2763,7 +2763,7 @@ void vnc_display_init(DisplayState *ds)
}
-void vnc_display_close(DisplayState *ds)
+static void vnc_display_close(DisplayState *ds)
{
VncDisplay *vs = ds ? (VncDisplay *)ds->opaque : vnc_display;
@@ -2785,7 +2785,7 @@ void vnc_display_close(DisplayState *ds)
#endif
}
-int vnc_display_disable_login(DisplayState *ds)
+static int vnc_display_disable_login(DisplayState *ds)
{
VncDisplay *vs = ds ? (VncDisplay *)ds->opaque : vnc_display;
diff --git a/ui/vnc.h b/ui/vnc.h
index 068c2fc..c89f693 100644
--- a/ui/vnc.h
+++ b/ui/vnc.h
@@ -493,9 +493,6 @@ void vnc_read_when(VncState *vs, VncReadEvent *func, size_t
expecting);
/* Buffer I/O functions */
-uint8_t read_u8(uint8_t *data, size_t offset);
-uint16_t read_u16(uint8_t *data, size_t offset);
-int32_t read_s32(uint8_t *data, size_t offset);
uint32_t read_u32(uint8_t *data, size_t offset);
/* Protocol stage functions */
@@ -507,8 +504,6 @@ void start_auth_vnc(VncState *vs);
/* Buffer management */
void buffer_reserve(Buffer *buffer, size_t len);
-int buffer_empty(Buffer *buffer);
-uint8_t *buffer_end(Buffer *buffer);
void buffer_reset(Buffer *buffer);
void buffer_free(Buffer *buffer);
void buffer_append(Buffer *buffer, const void *data, size_t len);
--
1.7.12.1
- [Qemu-devel] [PULL 1.3 0/9] Trivial patches for 20 October to 1 November 2012, Stefan Hajnoczi, 2012/11/01
- [Qemu-devel] [PATCH 1/9] cadence_uart: More debug information, Stefan Hajnoczi, 2012/11/01
- [Qemu-devel] [PATCH 2/6] targphys.h: Don't define target_phys_addr_t for user-mode emulators, Stefan Hajnoczi, 2012/11/01
- [Qemu-devel] [PATCH 2/9] m68k: Return semihosting errno values correctly, Stefan Hajnoczi, 2012/11/01
- [Qemu-devel] [PATCH 1/6] ui/vnc: Only report/use TIGHT_PNG encoding if enabled., Stefan Hajnoczi, 2012/11/01
- [Qemu-devel] [PATCH 3/6] target-arm/neon_helper: Remove obsolete FIXME comment, Stefan Hajnoczi, 2012/11/01
- [Qemu-devel] [PATCH 3/9] target-sparc: make do_unaligned_access static, Stefan Hajnoczi, 2012/11/01
- [Qemu-devel] [PATCH 4/6] configure: Remove unused parameters from main function, Stefan Hajnoczi, 2012/11/01
- [Qemu-devel] [PATCH 4/9] vl.c: add missing static, Stefan Hajnoczi, 2012/11/01
- [Qemu-devel] [PATCH 5/6] net/tap-win32: Fix compiler warning caused by missing include statement, Stefan Hajnoczi, 2012/11/01
- [Qemu-devel] [PATCH 5/9] vnc: add missing static,
Stefan Hajnoczi <=
- [Qemu-devel] [PATCH 6/9] ppc: add missing static, Stefan Hajnoczi, 2012/11/01
- [Qemu-devel] [PATCH 6/6] ui/vnc-jobs.c: Fix minor typos in comments, Stefan Hajnoczi, 2012/11/01
- [Qemu-devel] [PATCH 7/9] target-ppc: make some functions static, Stefan Hajnoczi, 2012/11/01
- [Qemu-devel] [PATCH 9/9] pc: Drop redundant test for ROM memory region, Stefan Hajnoczi, 2012/11/01
- [Qemu-devel] [PATCH 8/9] exec: make some functions static, Stefan Hajnoczi, 2012/11/01
- Re: [Qemu-devel] [PULL 1.3 0/9] Trivial patches for 20 October to 1 November 2012, Blue Swirl, 2012/11/03