Skip to content

Commit 21c6608

Browse files
committed
Merge branch 'jc/unused-on-windows'
Fix more fallouts from -Werror=unused-parameter. * jc/unused-on-windows: refs/files-backend: work around -Wunused-parameter
2 parents 4476304 + ab8bcd2 commit 21c6608

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

refs/files-backend.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1946,20 +1946,23 @@ static int commit_ref_update(struct files_ref_store *refs,
19461946
return 0;
19471947
}
19481948

1949+
#ifdef NO_SYMLINK_HEAD
1950+
#define create_ref_symlink(a, b) (-1)
1951+
#else
19491952
static int create_ref_symlink(struct ref_lock *lock, const char *target)
19501953
{
19511954
int ret = -1;
1952-
#ifndef NO_SYMLINK_HEAD
1955+
19531956
char *ref_path = get_locked_file_path(&lock->lk);
19541957
unlink(ref_path);
19551958
ret = symlink(target, ref_path);
19561959
free(ref_path);
19571960

19581961
if (ret)
19591962
fprintf(stderr, "no symlink - falling back to symbolic ref\n");
1960-
#endif
19611963
return ret;
19621964
}
1965+
#endif
19631966

19641967
static int create_symref_lock(struct ref_lock *lock, const char *target,
19651968
struct strbuf *err)

0 commit comments

Comments
 (0)