mirror of
https://github.com/git/git
synced 2024-08-27 03:29:21 +00:00
vcs-svn: suppress signed/unsigned comparison warnings
These are already safe because both sides of the comparison are nonnegative. This would normally not be important because Git is not -Wsign-compare clean anyway, but we like to keep the vcs-svn/ lib to a higher standard for convenience using it in other projects. Signed-off-by: David Barr <davidbarr@google.com> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
This commit is contained in:
parent
53153e8382
commit
6a0b4438af
|
@ -254,7 +254,7 @@ static int parse_ls_response(const char *response, uint32_t *mode,
|
|||
}
|
||||
|
||||
/* Mode. */
|
||||
if (response_end - response < strlen("100644") ||
|
||||
if (response_end - response < (signed) strlen("100644") ||
|
||||
response[strlen("100644")] != ' ')
|
||||
die("invalid ls response: missing mode: %s", response);
|
||||
*mode = 0;
|
||||
|
@ -267,7 +267,7 @@ static int parse_ls_response(const char *response, uint32_t *mode,
|
|||
}
|
||||
|
||||
/* ' blob ' or ' tree ' */
|
||||
if (response_end - response < strlen(" blob ") ||
|
||||
if (response_end - response < (signed) strlen(" blob ") ||
|
||||
(response[1] != 'b' && response[1] != 't'))
|
||||
die("unexpected ls response: not a tree or blob: %s", response);
|
||||
response += strlen(" blob ");
|
||||
|
|
Loading…
Reference in a new issue