Skip to content

Commit 4af5174

Browse files
carenasgitster
authored andcommitted
sequencer: cleanup for gcc warning in non developer mode
as shown by: sequencer.c: In function ‘write_basic_state’: sequencer.c:2392:37: warning: zero-length gnu_printf format string [-Wformat-zero-length] write_file(rebase_path_verbose(), ""); where write_file will create an empty file if told to write an empty string as can be inferred by the previous call the somehow more convoluted syntax works around the issue by providing a non empty format string and is already being used for the abort safety file since 1e41229 ("sequencer: make sequencer abort safer", 2016-12-07) Signed-off-by: Carlo Marcelo Arenas Belón <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 34b4731 commit 4af5174

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sequencer.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2335,7 +2335,7 @@ int write_basic_state(struct replay_opts *opts, const char *head_name,
23352335
write_file(rebase_path_quiet(), "\n");
23362336

23372337
if (opts->verbose)
2338-
write_file(rebase_path_verbose(), "");
2338+
write_file(rebase_path_verbose(), "%s", "");
23392339
if (opts->strategy)
23402340
write_file(rebase_path_strategy(), "%s\n", opts->strategy);
23412341
if (opts->xopts_nr > 0)

0 commit comments

Comments
 (0)