From 3ce3ffb840a1dfa7fcbafa9309fab37478605d08 Mon Sep 17 00:00:00 2001 From: Antoine Pelisse Date: Sun, 3 Feb 2013 14:37:09 +0000 Subject: fix clang -Wtautological-compare with unsigned enum Create a GREP_HEADER_FIELD_MIN so we can check that the field value is sane and silence the clang warning. Clang warning happens because the enum is unsigned (this is implementation-defined, and there is no negative fields) and the check is then tautological. Signed-off-by: Antoine Pelisse Signed-off-by: John Keeping Reviewed-by: Jonathan Nieder Signed-off-by: Junio C Hamano --- grep.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'grep.h') diff --git a/grep.h b/grep.h index 8fc854f40..e4a1df56a 100644 --- a/grep.h +++ b/grep.h @@ -28,7 +28,8 @@ enum grep_context { }; enum grep_header_field { - GREP_HEADER_AUTHOR = 0, + GREP_HEADER_FIELD_MIN = 0, + GREP_HEADER_AUTHOR = GREP_HEADER_FIELD_MIN, GREP_HEADER_COMMITTER, GREP_HEADER_REFLOG, -- cgit v1.2.1