mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2024-11-10 20:33:46 +01:00
Add noreturn attribute to out_of_memory (closes #43)
Add __attribute__((noreturn)) to out_of_memory if supported by the compiler (gcc, icc and clang).
This commit is contained in:
parent
9d00d67ed2
commit
da261141fd
@ -21,6 +21,12 @@
|
||||
/* macros */
|
||||
#define LENGTH(x) (sizeof(x)/sizeof((x)[0]))
|
||||
#define CLEAN(m) (m & ~(GDK_MOD2_MASK) & ~(GDK_BUTTON1_MASK) & ~(GDK_BUTTON2_MASK) & ~(GDK_BUTTON3_MASK) & ~(GDK_BUTTON4_MASK) & ~(GDK_BUTTON5_MASK) & ~(GDK_LEAVE_NOTIFY_MASK))
|
||||
#if defined(__GNUC__) || defined(__INTEL_COMPILER) || defined(__ICL) || defined(__ICC) || defined(__ECC) || defined(__clang__)
|
||||
/* only gcc, clang and Intel's cc seem support this */
|
||||
#define NORETURN __attribute__((noreturn))
|
||||
#else
|
||||
#define NORETURN
|
||||
#endif
|
||||
|
||||
/* enums */
|
||||
enum { NEXT, PREVIOUS, LEFT, RIGHT, UP, DOWN, BOTTOM, TOP, HIDE, HIGHLIGHT,
|
||||
@ -363,7 +369,7 @@ void notify(int, const char*);
|
||||
gboolean open_file(char*, char*);
|
||||
gboolean open_stdin(gchar*);
|
||||
void open_uri(char*);
|
||||
void out_of_memory(void);
|
||||
void out_of_memory(void) NORETURN;
|
||||
void update_status(void);
|
||||
void read_configuration_file(const char*);
|
||||
void read_configuration(void);
|
||||
|
Loading…
Reference in New Issue
Block a user