summaryrefslogtreecommitdiff
path: root/base.h
diff options
context:
space:
mode:
authorLeo Tenenbaum <pommicket@gmail.com>2020-11-24 17:03:23 -0500
committerLeo Tenenbaum <pommicket@gmail.com>2020-11-24 17:03:23 -0500
commite3aa668ef358739148adb1a4965b629d07467575 (patch)
treedddffef533139b5cc380783f45f17fce054f3480 /base.h
parent55d0ece0a9072ca409bdf6ff2f3b6d0b268e2952 (diff)
loading a file
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\"") \