diff options
author | Leo Tenenbaum <pommicket@gmail.com> | 2020-11-24 17:03:23 -0500 |
---|---|---|
committer | Leo Tenenbaum <pommicket@gmail.com> | 2020-11-24 17:03:23 -0500 |
commit | e3aa668ef358739148adb1a4965b629d07467575 (patch) | |
tree | dddffef533139b5cc380783f45f17fce054f3480 /base.h | |
parent | 55d0ece0a9072ca409bdf6ff2f3b6d0b268e2952 (diff) |
loading a file
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\"") \ |