Skip to content

Commit 13ee138

Browse files
toofishesgitster
authored andcommitted
Fix two unused variable warnings in gcc 4.6
Seen with -Wunused-but-set-variable. Signed-off-by: Dan McGee <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 37be802 commit 13ee138

File tree

2 files changed

+1
-6
lines changed

2 files changed

+1
-6
lines changed

http-fetch.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ static const char http_fetch_usage[] = "git http-fetch "
88

99
int main(int argc, const char **argv)
1010
{
11-
const char *prefix;
1211
struct walker *walker;
1312
int commits_on_stdin = 0;
1413
int commits;
@@ -60,7 +59,7 @@ int main(int argc, const char **argv)
6059
if (argv[arg])
6160
str_end_url_with_slash(argv[arg], &url);
6261

63-
prefix = setup_git_directory();
62+
setup_git_directory();
6463

6564
git_config(git_default_config, NULL);
6665

merge-recursive.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,6 @@ static void make_room_for_directories_of_df_conflicts(struct merge_options *o,
356356
*/
357357
const char *last_file = NULL;
358358
int last_len = 0;
359-
struct stage_data *last_e;
360359
int i;
361360

362361
for (i = 0; i < entries->nr; i++) {
@@ -386,7 +385,6 @@ static void make_room_for_directories_of_df_conflicts(struct merge_options *o,
386385
if (S_ISREG(e->stages[2].mode) || S_ISLNK(e->stages[2].mode)) {
387386
last_file = path;
388387
last_len = len;
389-
last_e = e;
390388
} else {
391389
last_file = NULL;
392390
}
@@ -961,7 +959,6 @@ static int process_renames(struct merge_options *o,
961959
}
962960

963961
for (i = 0, j = 0; i < a_renames->nr || j < b_renames->nr;) {
964-
char *src;
965962
struct string_list *renames1, *renames2Dst;
966963
struct rename *ren1 = NULL, *ren2 = NULL;
967964
const char *branch1, *branch2;
@@ -996,7 +993,6 @@ static int process_renames(struct merge_options *o,
996993
ren2 = ren1;
997994
ren1 = tmp;
998995
}
999-
src = ren1->pair->one->path;
1000996

1001997
ren1->dst_entry->processed = 1;
1002998
ren1->src_entry->processed = 1;

0 commit comments

Comments
 (0)