Commit 27061b15 by Russell Belfer

Fix some newer GCC compiler warnings

parent 9ce4f7da
...@@ -245,7 +245,7 @@ void test_checkout_index__options_dir_modes(void) ...@@ -245,7 +245,7 @@ void test_checkout_index__options_dir_modes(void)
(void)p_umask(um = p_umask(022)); (void)p_umask(um = p_umask(022));
cl_git_pass(p_stat("./testrepo/a", &st)); cl_git_pass(p_stat("./testrepo/a", &st));
cl_assert_equal_i_fmt(st.st_mode, GIT_FILEMODE_TREE | 0701 & ~um, "%07o"); cl_assert_equal_i_fmt(st.st_mode, (GIT_FILEMODE_TREE | 0701) & ~um, "%07o");
/* File-mode test, since we're on the 'dir' branch */ /* File-mode test, since we're on the 'dir' branch */
cl_git_pass(p_stat("./testrepo/a/b.txt", &st)); cl_git_pass(p_stat("./testrepo/a/b.txt", &st));
......
...@@ -1100,7 +1100,6 @@ void test_diff_rename__can_rename_from_rewrite(void) ...@@ -1100,7 +1100,6 @@ void test_diff_rename__can_rename_from_rewrite(void)
{ {
git_index *index; git_index *index;
git_tree *tree; git_tree *tree;
git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT;
git_diff_list *diff; git_diff_list *diff;
git_diff_options diffopts = GIT_DIFF_OPTIONS_INIT; git_diff_options diffopts = GIT_DIFF_OPTIONS_INIT;
git_diff_find_options findopts = GIT_DIFF_FIND_OPTIONS_INIT; git_diff_find_options findopts = GIT_DIFF_FIND_OPTIONS_INIT;
...@@ -1110,8 +1109,6 @@ void test_diff_rename__can_rename_from_rewrite(void) ...@@ -1110,8 +1109,6 @@ void test_diff_rename__can_rename_from_rewrite(void)
const char *targets[] = { "songof7cities.txt", "this-is-a-rename.txt" }; const char *targets[] = { "songof7cities.txt", "this-is-a-rename.txt" };
struct rename_expected expect = { 2, status, sources, targets }; struct rename_expected expect = { 2, status, sources, targets };
opts.checkout_strategy = GIT_CHECKOUT_FORCE;
cl_git_pass(git_repository_index(&index, g_repo)); cl_git_pass(git_repository_index(&index, g_repo));
cl_git_pass(p_rename("renames/songof7cities.txt", "renames/this-is-a-rename.txt")); cl_git_pass(p_rename("renames/songof7cities.txt", "renames/this-is-a-rename.txt"));
......
...@@ -132,8 +132,8 @@ static int build_fake_backend( ...@@ -132,8 +132,8 @@ static int build_fake_backend(
static void setup_repository_and_backend(git_error_code error_code) static void setup_repository_and_backend(git_error_code error_code)
{ {
git_odb *odb; git_odb *odb = NULL;
git_odb_backend *backend; git_odb_backend *backend = NULL;
_repo = cl_git_sandbox_init("testrepo.git"); _repo = cl_git_sandbox_init("testrepo.git");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment