summaryrefslogtreecommitdiff
path: root/base.h
diff options
context:
space:
mode:
Diffstat (limited to 'base.h')
-rw-r--r--base.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/base.h b/base.h
index 62c7117..e55ca09 100644
--- a/base.h
+++ b/base.h
@@ -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\"") \