diff options
-rw-r--r-- | engines/sci/include/heapmgr.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/engines/sci/include/heapmgr.h b/engines/sci/include/heapmgr.h index 63f566c638..5e837e7993 100644 --- a/engines/sci/include/heapmgr.h +++ b/engines/sci/include/heapmgr.h @@ -33,7 +33,9 @@ #define HEAPENTRY_INVALID -1 -#define ENTRY_IS_VALID(t, i) ((i) >= 0 && (i) < (t)->max_entry && (t)->table[(i)].next_free == (i)) +// FIXME: We write (i == 0 || i > 0) instead of (i >= 0) to silence certain annoying warnings: +// generated by GCC: "comparison is always true due to limited range of data type". +#define ENTRY_IS_VALID(t, i) ((i == 0 || i > 0) && (i) < (t)->max_entry && (t)->table[(i)].next_free == (i)) #define DECLARE_HEAPENTRY(ENTRY) \ typedef struct { \ |