mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice-common
synced 2026-01-06 22:48:09 +00:00
Add SPICE_ATTR_NORETURN and use it for a few functions
This commit is contained in:
parent
a1df67b3c5
commit
f7af6264ea
@ -37,7 +37,7 @@
|
||||
#include "lines.h"
|
||||
#include "rop3.h"
|
||||
#include "mem.h"
|
||||
|
||||
#include "macros.h"
|
||||
#include "mutex.h"
|
||||
|
||||
#define ROUND(_x) ((int)floor((_x) + 0.5))
|
||||
@ -1737,6 +1737,7 @@ static pixman_image_t *canvas_scale_surface(pixman_image_t *src, const SpiceRect
|
||||
return surface;
|
||||
}
|
||||
|
||||
SPICE_ATTR_NORETURN
|
||||
SPICE_ATTR_PRINTF(2, 3) static void quic_usr_error(QuicUsrContext *usr, const char *fmt, ...)
|
||||
{
|
||||
QuicData *usr_data = (QuicData *)usr;
|
||||
@ -1779,6 +1780,7 @@ SPICE_ATTR_PRINTF(2, 3) static void lz_usr_warn(LzUsrContext *usr, const char *f
|
||||
va_end(ap);
|
||||
}
|
||||
|
||||
SPICE_ATTR_NORETURN
|
||||
SPICE_ATTR_PRINTF(2, 3) static void lz_usr_error(LzUsrContext *usr, const char *fmt, ...)
|
||||
{
|
||||
LzData *usr_data = (LzData *)usr;
|
||||
|
||||
@ -26,5 +26,12 @@
|
||||
#define SPICE_ATTR_PRINTF(a,b)
|
||||
#endif /* __GNUC__ */
|
||||
|
||||
#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 5)
|
||||
#define SPICE_ATTR_NORETURN \
|
||||
__attribute__((noreturn))
|
||||
#else
|
||||
#define SPICE_ATTR_NORETURN
|
||||
#endif /* __GNUC__ */
|
||||
|
||||
|
||||
#endif /* __MACROS_H */
|
||||
|
||||
Loading…
Reference in New Issue
Block a user