]> git.ipfire.org Git - thirdparty/git.git/commit - grep.h
fix clang -Wtautological-compare with unsigned enum
authorAntoine Pelisse <apelisse@gmail.com>
Sun, 3 Feb 2013 14:37:09 +0000 (14:37 +0000)
committerJunio C Hamano <gitster@pobox.com>
Mon, 25 Feb 2013 15:35:55 +0000 (07:35 -0800)
commit3ce3ffb840a1dfa7fcbafa9309fab37478605d08
tree559c88acc087efae95e25a70067ff5e1afa0b49c
parent5ded807f7c0be10ecbb31555e5d10dee553752d6
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 <apelisse@gmail.com>
Signed-off-by: John Keeping <john@keeping.me.uk>
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
grep.c
grep.h