summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristophe Fergeau <cfergeau@redhat.com>2011-04-19 23:23:18 +0200
committerChristophe Fergeau <cfergeau@redhat.com>2011-05-02 11:24:44 +0200
commit8a1ceb65faedb182d4e274833d72d0862a46a876 (patch)
treefc363488190b7a5530385c856588e03f25359e9a
parentfa6956fff50ced22c20bd7a4f06a8fa00a0cd28c (diff)
downloadspice-8a1ceb65faedb182d4e274833d72d0862a46a876.tar.gz
spice-8a1ceb65faedb182d4e274833d72d0862a46a876.tar.xz
spice-8a1ceb65faedb182d4e274833d72d0862a46a876.zip
use foo(void) instead of foo() in prototypes
In C, the latter isn't a prototype for a function with no arg, but declares a function with an undefined number of args.
-rw-r--r--common/gdi_canvas.c2
-rw-r--r--common/gdi_canvas.h2
-rw-r--r--common/gl_canvas.c2
-rw-r--r--common/gl_canvas.h2
-rw-r--r--common/quic.c2
-rw-r--r--common/quic.h2
-rw-r--r--common/rop3.c2
-rw-r--r--common/rop3.h2
-rw-r--r--common/spice_common.h2
-rw-r--r--common/sw_canvas.c2
-rw-r--r--common/sw_canvas.h2
-rw-r--r--server/main_channel.h2
-rw-r--r--server/red_dispatcher.c14
-rw-r--r--server/red_dispatcher.h10
-rw-r--r--server/reds.c12
-rw-r--r--server/reds.h12
-rw-r--r--server/smartcard.c2
-rw-r--r--server/smartcard.h2
-rw-r--r--server/snd_worker.c2
-rw-r--r--server/snd_worker.h2
20 files changed, 40 insertions, 40 deletions
diff --git a/common/gdi_canvas.c b/common/gdi_canvas.c
index d57aafcb..360e6bf1 100644
--- a/common/gdi_canvas.c
+++ b/common/gdi_canvas.c
@@ -1828,7 +1828,7 @@ SpiceCanvas *gdi_canvas_create(int width, int height,
return (SpiceCanvas *)canvas;
}
-void gdi_canvas_init() //unsafe global function
+void gdi_canvas_init(void) //unsafe global function
{
if (!need_init) {
return;
diff --git a/common/gdi_canvas.h b/common/gdi_canvas.h
index 5cdffb3d..86be9e17 100644
--- a/common/gdi_canvas.h
+++ b/common/gdi_canvas.h
@@ -38,7 +38,7 @@ SpiceCanvas *gdi_canvas_create(int width, int height,
SpiceJpegDecoder *jpeg_decoder,
SpiceZlibDecoder *zlib_decoder);
-void gdi_canvas_init();
+void gdi_canvas_init(void);
#ifdef __cplusplus
}
diff --git a/common/gl_canvas.c b/common/gl_canvas.c
index 3edb2c73..9867c4f2 100644
--- a/common/gl_canvas.c
+++ b/common/gl_canvas.c
@@ -870,7 +870,7 @@ static void gl_canvas_destroy(SpiceCanvas *spice_canvas)
free(canvas);
}
-void gl_canvas_init() //unsafe global function
+void gl_canvas_init(void) //unsafe global function
{
if (!need_init) {
return;
diff --git a/common/gl_canvas.h b/common/gl_canvas.h
index 4a156689..67763791 100644
--- a/common/gl_canvas.h
+++ b/common/gl_canvas.h
@@ -40,7 +40,7 @@ SpiceCanvas *gl_canvas_create(int width, int height, uint32_t format
, SpiceZlibDecoder *zlib_decoder
);
void gl_canvas_set_textures_lost(SpiceCanvas *canvas, int textures_lost);
-void gl_canvas_init();
+void gl_canvas_init(void);
#ifdef __cplusplus
}
diff --git a/common/quic.c b/common/quic.c
index e2c211d9..cd3aee8b 100644
--- a/common/quic.c
+++ b/common/quic.c
@@ -1690,7 +1690,7 @@ void quic_destroy(QuicContext *quic)
encoder->usr->free(encoder->usr, encoder);
}
-void quic_init()
+void quic_init(void)
{
if (!need_init) {
return;
diff --git a/common/quic.h b/common/quic.h
index d0317772..6047da8b 100644
--- a/common/quic.h
+++ b/common/quic.h
@@ -63,7 +63,7 @@ int quic_decode(QuicContext *quic, QuicImageType type, uint8_t *buf, int stride)
QuicContext *quic_create(QuicUsrContext *usr);
void quic_destroy(QuicContext *quic);
-void quic_init();
+void quic_init(void);
#ifdef __cplusplus
}
diff --git a/common/rop3.c b/common/rop3.c
index 77f0a718..83880fe4 100644
--- a/common/rop3.c
+++ b/common/rop3.c
@@ -381,7 +381,7 @@ ROP3_HANDLERS(DPSoo, *src | *pat | *dest, 0xfe);
rop3_test_handlers_32[index] = rop3_test32_##op; \
rop3_test_handlers_16[index] = rop3_test16_##op;
-void rop3_init()
+void rop3_init(void)
{
static int need_init = 1;
int i;
diff --git a/common/rop3.h b/common/rop3.h
index 549b02cd..3307649f 100644
--- a/common/rop3.h
+++ b/common/rop3.h
@@ -33,7 +33,7 @@ void do_rop3_with_pattern(uint8_t rop3, pixman_image_t *d, pixman_image_t *s, Sp
void do_rop3_with_color(uint8_t rop3, pixman_image_t *d, pixman_image_t *s, SpicePoint *src_pos,
uint32_t rgb);
-void rop3_init();
+void rop3_init(void);
#ifdef __cplusplus
}
diff --git a/common/spice_common.h b/common/spice_common.h
index bacd24ae..75ebda75 100644
--- a/common/spice_common.h
+++ b/common/spice_common.h
@@ -60,7 +60,7 @@
} \
}
-static inline uint64_t get_time_stamp()
+static inline uint64_t get_time_stamp(void)
{
struct timespec time_space;
clock_gettime(CLOCK_MONOTONIC, &time_space);
diff --git a/common/sw_canvas.c b/common/sw_canvas.c
index f17bc588..95ec292f 100644
--- a/common/sw_canvas.c
+++ b/common/sw_canvas.c
@@ -1276,7 +1276,7 @@ SpiceCanvas *canvas_create_for_data(int width, int height, uint32_t format,
);
}
-void sw_canvas_init() //unsafe global function
+void sw_canvas_init(void) //unsafe global function
{
if (!need_init) {
return;
diff --git a/common/sw_canvas.h b/common/sw_canvas.h
index 42f2573f..54655262 100644
--- a/common/sw_canvas.h
+++ b/common/sw_canvas.h
@@ -57,7 +57,7 @@ SpiceCanvas *canvas_create_for_data(int width, int height, uint32_t format, uint
);
-void sw_canvas_init();
+void sw_canvas_init(void);
#ifdef __cplusplus
}
diff --git a/server/main_channel.h b/server/main_channel.h
index db95dc21..2776f01d 100644
--- a/server/main_channel.h
+++ b/server/main_channel.h
@@ -43,7 +43,7 @@ struct MainMigrateData {
uint32_t write_queue_size;
};
-Channel *main_channel_init();
+Channel *main_channel_init(void);
void main_channel_close(Channel *channel); // not destroy, just socket close
int main_channel_push_ping(Channel *channel, int size);
void main_channel_push_mouse_mode(Channel *channel, int current_mode, int is_client_mouse_allowed);
diff --git a/server/red_dispatcher.c b/server/red_dispatcher.c
index 75e0670e..06924580 100644
--- a/server/red_dispatcher.c
+++ b/server/red_dispatcher.c
@@ -170,12 +170,12 @@ int red_dispatcher_add_renderer(const char *name)
return TRUE;
}
-int red_dispatcher_qxl_count()
+int red_dispatcher_qxl_count(void)
{
return num_active_workers;
}
-static void update_client_mouse_allowed()
+static void update_client_mouse_allowed(void)
{
static int allowed = FALSE;
int allow_now = FALSE;
@@ -408,7 +408,7 @@ void red_dispatcher_set_mm_time(uint32_t mm_time)
}
}
-static inline int calc_compression_level()
+static inline int calc_compression_level(void)
{
ASSERT(streaming_video != STREAM_VIDEO_INVALID);
if ((streaming_video != STREAM_VIDEO_OFF) ||
@@ -419,7 +419,7 @@ static inline int calc_compression_level()
}
}
-void red_dispatcher_on_ic_change()
+void red_dispatcher_on_ic_change(void)
{
int compression_level = calc_compression_level();
RedDispatcher *now = dispatchers;
@@ -432,7 +432,7 @@ void red_dispatcher_on_ic_change()
}
}
-void red_dispatcher_on_sv_change()
+void red_dispatcher_on_sv_change(void)
{
int compression_level = calc_compression_level();
RedDispatcher *now = dispatchers;
@@ -456,7 +456,7 @@ void red_dispatcher_set_mouse_mode(uint32_t mode)
}
}
-int red_dispatcher_count()
+int red_dispatcher_count(void)
{
RedDispatcher *now = dispatchers;
int ret = 0;
@@ -468,7 +468,7 @@ int red_dispatcher_count()
return ret;
}
-uint32_t red_dispatcher_qxl_ram_size()
+uint32_t red_dispatcher_qxl_ram_size(void)
{
QXLDevInitInfo qxl_info;
if (!dispatchers) {
diff --git a/server/red_dispatcher.h b/server/red_dispatcher.h
index 7f8973a1..3f3c1aef 100644
--- a/server/red_dispatcher.h
+++ b/server/red_dispatcher.h
@@ -22,12 +22,12 @@
struct RedDispatcher *red_dispatcher_init(QXLInstance *qxl);
void red_dispatcher_set_mm_time(uint32_t);
-void red_dispatcher_on_ic_change();
-void red_dispatcher_on_sv_change();
+void red_dispatcher_on_ic_change(void);
+void red_dispatcher_on_sv_change(void);
void red_dispatcher_set_mouse_mode(uint32_t mode);
-int red_dispatcher_count();
+int red_dispatcher_count(void);
int red_dispatcher_add_renderer(const char *name);
-uint32_t red_dispatcher_qxl_ram_size();
-int red_dispatcher_qxl_count();
+uint32_t red_dispatcher_qxl_ram_size(void);
+int red_dispatcher_qxl_count(void);
#endif
diff --git a/server/reds.c b/server/reds.c
index cd86ab94..f4177380 100644
--- a/server/reds.c
+++ b/server/reds.c
@@ -1008,7 +1008,7 @@ void reds_fill_channels(SpiceMsgChannels *channels_info)
}
}
-void reds_on_main_agent_start()
+void reds_on_main_agent_start(void)
{
if (!vdagent) {
return;
@@ -1057,14 +1057,14 @@ void reds_on_main_agent_data(void *message, size_t size)
write_to_vdi_port();
}
-void reds_on_main_migrate_connected()
+void reds_on_main_migrate_connected(void)
{
if (reds->mig_wait_connect) {
reds_mig_cleanup();
}
}
-void reds_on_main_migrate_connect_error()
+void reds_on_main_migrate_connect_error(void)
{
if (reds->mig_wait_connect) {
reds_mig_cleanup();
@@ -3127,7 +3127,7 @@ static void migrate_timout(void *opaque)
reds_mig_disconnect();
}
-uint32_t reds_get_mm_time()
+uint32_t reds_get_mm_time(void)
{
struct timespec time_space;
clock_gettime(CLOCK_MONOTONIC, &time_space);
@@ -3139,7 +3139,7 @@ void reds_update_mm_timer(uint32_t mm_time)
red_dispatcher_set_mm_time(mm_time);
}
-void reds_enable_mm_timer()
+void reds_enable_mm_timer(void)
{
core->timer_start(reds->mm_timer, MM_TIMER_GRANULARITY_MS);
if (!reds_main_channel_connected()) {
@@ -3148,7 +3148,7 @@ void reds_enable_mm_timer()
main_channel_push_multi_media_time(reds->main_channel, reds_get_mm_time() - MM_TIME_DELTA);
}
-void reds_desable_mm_timer()
+void reds_desable_mm_timer(void)
{
core->timer_cancel(reds->mm_timer);
}
diff --git a/server/reds.h b/server/reds.h
index 485d9eb4..2c0e6924 100644
--- a/server/reds.h
+++ b/server/reds.h
@@ -118,10 +118,10 @@ ssize_t reds_stream_write(RedsStream *s, const void *buf, size_t nbyte);
ssize_t reds_stream_writev(RedsStream *s, const struct iovec *iov, int iovcnt);
void reds_stream_free(RedsStream *s);
-void reds_desable_mm_timer();
-void reds_enable_mm_timer();
+void reds_desable_mm_timer(void);
+void reds_enable_mm_timer(void);
void reds_update_mm_timer(uint32_t mm_time);
-uint32_t reds_get_mm_time();
+uint32_t reds_get_mm_time(void);
void reds_set_client_mouse_allowed(int is_client_mouse_allowed,
int x_res, int y_res);
void reds_register_channel(Channel *channel);
@@ -151,10 +151,10 @@ void reds_update_stat_value(uint32_t value);
#endif
// callbacks from main channel messages
-void reds_on_main_agent_start();
+void reds_on_main_agent_start(void);
void reds_on_main_agent_data(void *message, size_t size);
-void reds_on_main_migrate_connected();
-void reds_on_main_migrate_connect_error();
+void reds_on_main_migrate_connected(void);
+void reds_on_main_migrate_connect_error(void);
void reds_on_main_receive_migrate_data(MainMigrateData *data, uint8_t *end);
void reds_on_main_mouse_mode_request(void *message, size_t size);
diff --git a/server/smartcard.c b/server/smartcard.c
index 941c6329..892500bb 100644
--- a/server/smartcard.c
+++ b/server/smartcard.c
@@ -507,7 +507,7 @@ static void smartcard_migrate(Channel *channel)
{
}
-void smartcard_channel_init()
+void smartcard_channel_init(void)
{
Channel *channel;
diff --git a/server/smartcard.h b/server/smartcard.h
index 790eb878..bb2f0b60 100644
--- a/server/smartcard.h
+++ b/server/smartcard.h
@@ -12,7 +12,7 @@
int smartcard_device_connect(SpiceCharDeviceInstance *char_device);
void smartcard_device_disconnect(SpiceCharDeviceInstance *char_device);
-void smartcard_channel_init();
+void smartcard_channel_init(void);
#endif // __SMART_CARD_H__
diff --git a/server/snd_worker.c b/server/snd_worker.c
index 1a4840c7..9ecd3825 100644
--- a/server/snd_worker.c
+++ b/server/snd_worker.c
@@ -1271,7 +1271,7 @@ void snd_set_playback_compression(int on)
}
}
-int snd_get_playback_compression()
+int snd_get_playback_compression(void)
{
return (playback_compression == SPICE_AUDIO_DATA_MODE_RAW) ? FALSE : TRUE;
}
diff --git a/server/snd_worker.h b/server/snd_worker.h
index 4d5a1b4a..7659cb23 100644
--- a/server/snd_worker.h
+++ b/server/snd_worker.h
@@ -27,7 +27,7 @@ void snd_attach_record(SpiceRecordInstance *sin);
void snd_detach_record(SpiceRecordInstance *sin);
void snd_set_playback_compression(int on);
-int snd_get_playback_compression();
+int snd_get_playback_compression(void);
#endif