mirror of
https://github.com/git/git.git
synced 2024-11-02 15:28:21 +01:00
Merge branch 'jk/suppress-clang-warning'
* jk/suppress-clang-warning: fix clang -Wtautological-compare with unsigned enum
This commit is contained in:
commit
edb99f95f5
2 changed files with 4 additions and 2 deletions
3
grep.c
3
grep.c
|
@ -625,7 +625,8 @@ static struct grep_expr *prep_header_patterns(struct grep_opt *opt)
|
||||||
for (p = opt->header_list; p; p = p->next) {
|
for (p = opt->header_list; p; p = p->next) {
|
||||||
if (p->token != GREP_PATTERN_HEAD)
|
if (p->token != GREP_PATTERN_HEAD)
|
||||||
die("bug: a non-header pattern in grep header list.");
|
die("bug: a non-header pattern in grep header list.");
|
||||||
if (p->field < 0 || GREP_HEADER_FIELD_MAX <= p->field)
|
if (p->field < GREP_HEADER_FIELD_MIN ||
|
||||||
|
GREP_HEADER_FIELD_MAX <= p->field)
|
||||||
die("bug: unknown header field %d", p->field);
|
die("bug: unknown header field %d", p->field);
|
||||||
compile_regexp(p, opt);
|
compile_regexp(p, opt);
|
||||||
}
|
}
|
||||||
|
|
3
grep.h
3
grep.h
|
@ -28,7 +28,8 @@ enum grep_context {
|
||||||
};
|
};
|
||||||
|
|
||||||
enum grep_header_field {
|
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_COMMITTER,
|
||||||
GREP_HEADER_REFLOG,
|
GREP_HEADER_REFLOG,
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue