From 72c56691ec8b1e0a908e901b60f8bd3744b25aba Mon Sep 17 00:00:00 2001 From: hwangcc23 Date: Mon, 4 Apr 2022 23:29:48 +0800 Subject: 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. --- HeaderLayout.h | 1 + 1 file changed, 1 insertion(+) 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, -- cgit v1.2.3