diff options
author | Max Horn | 2009-02-17 18:16:41 +0000 |
---|---|---|
committer | Max Horn | 2009-02-17 18:16:41 +0000 |
commit | cd8f4c5ae247b8acf823a662928958496c30690f (patch) | |
tree | 4fae07255626eadde47bfccf866c110695ef89ac | |
parent | 515dfac64c3a6baec4696f1c0141c5fb473297ef (diff) | |
download | scummvm-rg350-cd8f4c5ae247b8acf823a662928958496c30690f.tar.gz scummvm-rg350-cd8f4c5ae247b8acf823a662928958496c30690f.tar.bz2 scummvm-rg350-cd8f4c5ae247b8acf823a662928958496c30690f.zip |
SCI: Silence 'check always true' warnings with a trick (temporary, that code needs to be revised anyway)
svn-id: r38432
-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 { \ |