From: Mark Jamsek Subject: zap unused var To: gameoftrees@openbsd.org Date: Fri, 28 Jul 2023 16:09:16 +1000 Spotted by chance; 'commit' isn't used in this function. diff /home/mark/src/got commit - 1f5993e02a319fbcf02f9dbcd2926397fc7b3462 path + /home/mark/src/got blob - 72eb97a7e23d5f426a1660337c93deb7704985ad file + got/got.c --- got/got.c +++ got/got.c @@ -12199,7 +12199,6 @@ histedit_save_list(struct got_histedit_list *histedit_ char *path = NULL; FILE *f = NULL; struct got_histedit_list_entry *hle; - struct got_commit_object *commit = NULL; err = got_worktree_get_histedit_script_path(&path, worktree); if (err) @@ -12229,8 +12228,6 @@ done: if (f && fclose(f) == EOF && err == NULL) err = got_error_from_errno("fclose"); free(path); - if (commit) - got_object_commit_close(commit); return err; } -- Mark Jamsek GPG: F2FF 13DE 6A06 C471 CA80 E6E2 2930 DC66 86EE CF68