mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice
synced 2025-12-26 22:48:19 +00:00
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. [picked from master with changes since no main_channel, spice_common, and a bunch of functions aren't there yet]
This commit is contained in:
parent
0d1a9a3c89
commit
7db7212c3a
@ -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;
|
||||
|
||||
@ -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
|
||||
}
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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
|
||||
}
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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
|
||||
}
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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
|
||||
}
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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
|
||||
}
|
||||
|
||||
@ -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;
|
||||
@ -474,7 +474,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) ||
|
||||
@ -485,7 +485,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;
|
||||
@ -498,7 +498,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;
|
||||
@ -522,7 +522,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;
|
||||
@ -534,7 +534,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) {
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
@ -4100,7 +4100,7 @@ static void key_modifiers_sender(void *opaque)
|
||||
reds_send_keyboard_modifiers(kbd_get_leds(keyboard));
|
||||
}
|
||||
|
||||
uint32_t reds_get_mm_time()
|
||||
uint32_t reds_get_mm_time(void)
|
||||
{
|
||||
struct timespec time_space;
|
||||
clock_gettime(CLOCK_MONOTONIC, &time_space);
|
||||
@ -4112,7 +4112,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)
|
||||
{
|
||||
SpiceMsgMainMultiMediaTime time_mes;
|
||||
RedsOutItem *item;
|
||||
@ -4128,7 +4128,7 @@ void reds_enable_mm_timer()
|
||||
reds_push_pipe_item(item);
|
||||
}
|
||||
|
||||
void reds_desable_mm_timer()
|
||||
void reds_desable_mm_timer(void)
|
||||
{
|
||||
core->timer_cancel(reds->mm_timer);
|
||||
}
|
||||
|
||||
@ -126,10 +126,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);
|
||||
|
||||
@ -29,7 +29,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__
|
||||
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user