summaryrefslogtreecommitdiff
path: root/vcs-svn
diff options
context:
space:
mode:
authorDavid Barr <davidbarr@google.com>2012-06-01 00:41:29 +1000
committerJonathan Nieder <jrnieder@gmail.com>2012-07-05 23:26:53 -0500
commit6a0b4438afc22551533dccc221bdf802ee4ed5ee (patch)
treeea0f4fb330add91c1f79e191871987e1dad4a54c /vcs-svn
parent53153e8382966e35362d072ba17ba5887e3c0851 (diff)
downloadgit-6a0b4438afc22551533dccc221bdf802ee4ed5ee.tar.gz
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>
Diffstat (limited to 'vcs-svn')
-rw-r--r--vcs-svn/fast_export.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/vcs-svn/fast_export.c b/vcs-svn/fast_export.c
index 854b328d43..1f04697866 100644
--- a/vcs-svn/fast_export.c
+++ b/vcs-svn/fast_export.c
@@ -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 ");