]> git.ipfire.org Git - thirdparty/git.git/commitdiff
rebase-interactive.c: silence format-zero-length warnings
authorRalf Thielow <ralf.thielow@gmail.com>
Thu, 27 Feb 2020 20:25:30 +0000 (20:25 +0000)
committerJunio C Hamano <gitster@pobox.com>
Fri, 28 Feb 2020 16:39:09 +0000 (08:39 -0800)
Fixes the following warnings:

rebase-interactive.c: In function ‘edit_todo_list’:
rebase-interactive.c:137:38: warning: zero-length gnu_printf format string [-Wformat-zero-length]
    write_file(rebase_path_dropped(), "");
rebase-interactive.c:144:37: warning: zero-length gnu_printf format string [-Wformat-zero-length]
   write_file(rebase_path_dropped(), "");

Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
rebase-interactive.c

index ac001dea5887a119f839ab4577797f9a9a179174..0a4572e67eab28a54c32d93770ebeccaadefe50a 100644 (file)
@@ -134,14 +134,14 @@ int edit_todo_list(struct repository *r, struct todo_list *todo_list,
 
        if (incorrect) {
                if (todo_list_check_against_backup(r, new_todo)) {
-                       write_file(rebase_path_dropped(), "");
+                       write_file(rebase_path_dropped(), "%s", "");
                        return -4;
                }
 
                if (incorrect > 0)
                        unlink(rebase_path_dropped());
        } else if (todo_list_check(todo_list, new_todo)) {
-               write_file(rebase_path_dropped(), "");
+               write_file(rebase_path_dropped(), "%s", "");
                return -4;
        }