mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice-common
synced 2026-08-08 20:28:57 +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.
This commit is contained in:
parent
9a715c8b95
commit
b999645295
@ -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
|
||||
}
|
||||
|
||||
2
quic.c
2
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;
|
||||
|
||||
2
quic.h
2
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
|
||||
}
|
||||
|
||||
2
rop3.c
2
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;
|
||||
|
||||
2
rop3.h
2
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
|
||||
}
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user