summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVicent Martí <vicent@github.com>2013-06-14 11:13:05 -0700
committerVicent Martí <vicent@github.com>2013-06-14 11:13:05 -0700
commit824cf80f061ab31f45c94576f9e75533201a4578 (patch)
tree07859f1df1c9011b239cb00885a1350e9d6a7a8f
parent4878ea45685c676491575fa7b54d9d9085fd7778 (diff)
parent519072c9bfedeb2b6c4a8ad49739e5563813c3c4 (diff)
downloadlibgit2-824cf80f061ab31f45c94576f9e75533201a4578.tar.gz
Merge pull request #1652 from yorah/fix/build-warnings
Fix/build warnings
-rw-r--r--src/fileops.c2
-rw-r--r--tests-clar/diff/rename.c2
2 files changed, 3 insertions, 1 deletions
diff --git a/src/fileops.c b/src/fileops.c
index 02f48e120..ae240fcd2 100644
--- a/src/fileops.c
+++ b/src/fileops.c
@@ -320,7 +320,7 @@ int git_futils_mkdir(
min_root_len = git_path_root(make_path.ptr);
if (root < min_root_len)
root = min_root_len;
- while (make_path.ptr[root] == '/')
+ while (root >= 0 && make_path.ptr[root] == '/')
++root;
/* clip root to make_path length */
diff --git a/tests-clar/diff/rename.c b/tests-clar/diff/rename.c
index fd31a3859..224945e60 100644
--- a/tests-clar/diff/rename.c
+++ b/tests-clar/diff/rename.c
@@ -825,6 +825,8 @@ int test_names_expected(const git_diff_delta *delta, float progress, void *p)
{
struct rename_expected *expected = p;
+ GIT_UNUSED(progress);
+
cl_assert(expected->idx < expected->len);
cl_assert_equal_i(delta->status, GIT_DELTA_RENAMED);