rebase-interactive.c: silence format-zero-length warnings
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>
Ralf Thielow committed
Feb 27, 2020 at 20:25 UTC
7daf4f2ac7b8fdddf6d8e128dc30e7daec7abad2
1 file changed
+2
-2
rebase-interactive.c
+2
-2
@@ -134,14 +134,14 @@ int edit_todo_list(struct repository *r, struct todo_list *todo_list,
134
135
if (incorrect) {
136
if (todo_list_check_against_backup(r, new_todo)) {
137
- write_file(rebase_path_dropped(), "");
137
+ write_file(rebase_path_dropped(), "%s", "");
138
return -4;
139
}
140
141
if (incorrect > 0)
142
unlink(rebase_path_dropped());
143
} else if (todo_list_check(todo_list, new_todo)) {
144
- write_file(rebase_path_dropped(), "");
144
+ write_file(rebase_path_dropped(), "%s", "");
145
return -4;
146
}
147