fix worktree test build: remove more unused variables
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
diff --git a/lib/fileindex.c b/lib/fileindex.c
index 8ca7884..349b0aa 100644
--- a/lib/fileindex.c
+++ b/lib/fileindex.c
@@ -184,7 +184,7 @@ write_fileindex_entry(SHA1_CTX *ctx, struct got_fileindex_entry *entry,
FILE *outfile)
{
const struct got_error *err;
- size_t n, len, pad;
+ size_t n;
err = write_fileindex_val64(ctx, entry->ctime_sec, outfile);
if (err)
diff --git a/lib/worktree.c b/lib/worktree.c
index 78b75a9..1273d61 100644
--- a/lib/worktree.c
+++ b/lib/worktree.c
@@ -235,7 +235,6 @@ got_worktree_open(struct got_worktree **worktree, const char *path)
{
const struct got_error *err = NULL;
char *path_got;
- char *refstr = NULL;
char *formatstr = NULL;
char *path_lock = NULL;
int version, fd = -1;
@@ -432,7 +431,6 @@ add_dir_on_disk(struct got_worktree *worktree, const char *path)
{
const struct got_error *err = NULL;
char *abspath;
- size_t len;
if (asprintf(&abspath, "%s/%s", worktree->root_path,
apply_path_prefix(worktree, path)) == -1)
diff --git a/regress/worktree/worktree_test.c b/regress/worktree/worktree_test.c
index 1141928..84ee710 100644
--- a/regress/worktree/worktree_test.c
+++ b/regress/worktree/worktree_test.c
@@ -104,7 +104,6 @@ static int
read_meta_file(char **content, const char *path)
{
FILE *f;
- size_t n;
size_t len;
const char delim[3] = {'\0', '\0', '\0'};
int ret = 0;
@@ -249,9 +248,7 @@ worktree_init_exists(const char *repo_path)
struct got_repository *repo = NULL;
char worktree_path[PATH_MAX];
char *gotpath = NULL;
- char *path;
int ok = 0;
- FILE *f;
err = got_repo_open(&repo, repo_path);
if (err != NULL || repo == NULL)
@@ -383,7 +380,6 @@ main(int argc, char *argv[])
int test_ok = 0, failure = 0;
const char *repo_path;
int ch;
- int vflag = 0;
while ((ch = getopt(argc, argv, "v")) != -1) {
switch (ch) {