Skip to content

Commit 7daf4f2

Browse files
ralfthgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 5a5445d commit 7daf4f2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

rebase-interactive.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,14 +134,14 @@ int edit_todo_list(struct repository *r, struct todo_list *todo_list,
134134

135135
if (incorrect) {
136136
if (todo_list_check_against_backup(r, new_todo)) {
137-
write_file(rebase_path_dropped(), "");
137+
write_file(rebase_path_dropped(), "%s", "");
138138
return -4;
139139
}
140140

141141
if (incorrect > 0)
142142
unlink(rebase_path_dropped());
143143
} else if (todo_list_check(todo_list, new_todo)) {
144-
write_file(rebase_path_dropped(), "");
144+
write_file(rebase_path_dropped(), "%s", "");
145145
return -4;
146146
}
147147

0 commit comments

Comments
 (0)