diff options
Diffstat (limited to 'base.h')
-rw-r--r-- | base.h | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -9,6 +9,7 @@ #include <stdint.h> #include <stdio.h> #include <stddef.h> +#include <assert.h> typedef uint8_t u8; typedef uint16_t u16; @@ -24,6 +25,15 @@ typedef unsigned int uint; typedef unsigned long ulong; #ifdef __GNUC__ +#define WarnUnusedResult __attribute__((warn_unused_result)) +#else +#define WarnUnusedResult +#endif + +#define Status bool WarnUnusedResult // false = error, true = success + + +#ifdef __GNUC__ #define no_warn_start _Pragma("GCC diagnostic push") \ _Pragma("GCC diagnostic ignored \"-Wpedantic\"") \ _Pragma("GCC diagnostic ignored \"-Wsign-conversion\"") \ |