Skip to content

Commit

Permalink
Fix two unused variable warnings in gcc 4.6
Browse files Browse the repository at this point in the history
Seen with -Wunused-but-set-variable.

Signed-off-by: Dan McGee <dpmcgee@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Dan McGee authored and Junio C Hamano committed Apr 3, 2011
1 parent 37be802 commit 13ee138
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
3 changes: 1 addition & 2 deletions http-fetch.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ static const char http_fetch_usage[] = "git http-fetch "

int main(int argc, const char **argv)
{
const char *prefix;
struct walker *walker;
int commits_on_stdin = 0;
int commits;
Expand Down Expand Up @@ -60,7 +59,7 @@ int main(int argc, const char **argv)
if (argv[arg])
str_end_url_with_slash(argv[arg], &url);

prefix = setup_git_directory();
setup_git_directory();

git_config(git_default_config, NULL);

Expand Down
4 changes: 0 additions & 4 deletions merge-recursive.c
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,6 @@ static void make_room_for_directories_of_df_conflicts(struct merge_options *o,
*/
const char *last_file = NULL;
int last_len = 0;
struct stage_data *last_e;
int i;

for (i = 0; i < entries->nr; i++) {
Expand Down Expand Up @@ -386,7 +385,6 @@ static void make_room_for_directories_of_df_conflicts(struct merge_options *o,
if (S_ISREG(e->stages[2].mode) || S_ISLNK(e->stages[2].mode)) {
last_file = path;
last_len = len;
last_e = e;
} else {
last_file = NULL;
}
Expand Down Expand Up @@ -961,7 +959,6 @@ static int process_renames(struct merge_options *o,
}

for (i = 0, j = 0; i < a_renames->nr || j < b_renames->nr;) {
char *src;
struct string_list *renames1, *renames2Dst;
struct rename *ren1 = NULL, *ren2 = NULL;
const char *branch1, *branch2;
Expand Down Expand Up @@ -996,7 +993,6 @@ static int process_renames(struct merge_options *o,
ren2 = ren1;
ren1 = tmp;
}
src = ren1->pair->one->path;

ren1->dst_entry->processed = 1;
ren1->src_entry->processed = 1;
Expand Down

0 comments on commit 13ee138

Please sign in to comment.