diff options
author | hwangcc23 <hwangcc@csie.nctu.edu.tw> | 2022-04-04 23:29:48 +0800 |
---|---|---|
committer | BenBE <BenBE@geshi.org> | 2022-04-05 09:23:03 +0200 |
commit | 72c56691ec8b1e0a908e901b60f8bd3744b25aba (patch) | |
tree | 09e7c92a07cf8743fb93f1a35d4a64faa0658f06 | |
parent | 4ccad4604586c921b4ad831b254496c2cdece9fc (diff) |
Fix a compile warning: comparison of unsigned enum expression < 0 is always false
Get this warning when compiling Settings.c on the Mac OS X with clang-800.0.42.1.
Settings.c:447:28: warning: comparison of unsigned enum expression < 0 is always false [-Wtautological-compare]
if (this->hLayout < 0 || this->hLayout >= LAST_HEADER_LAYOUT)
~~~~~~~~~~~~~ ^ ~
This patch fixes the problem.
-rw-r--r-- | HeaderLayout.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/HeaderLayout.h b/HeaderLayout.h index 46cca14f..1cf7bf7b 100644 --- a/HeaderLayout.h +++ b/HeaderLayout.h @@ -18,6 +18,7 @@ in the source distribution for its full text. typedef enum HeaderLayout_ { + HF_INVALID = -1, HF_TWO_50_50, HF_TWO_33_67, HF_TWO_67_33, |