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 1e41229d96 ("sequencer: make sequencer abort safer", 2016-12-07) Signed-off-by: Carlo Marcelo Arenas Belón <carenas@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Carlo Marcelo Arenas Belón committed Oct 25, 2018 at 02:38 UTC 4af5174168f8f08c063fd24f8626f406feacacc5
1 file changed +1 -1
sequencer.c
+1 -1
@@ -2335,7 +2335,7 @@ int write_basic_state(struct replay_opts *opts, const char *head_name,
2335 write_file(rebase_path_quiet(), "\n");
2336
2337 if (opts->verbose)
2338 - write_file(rebase_path_verbose(), "");
2338 + write_file(rebase_path_verbose(), "%s", "");
2339 if (opts->strategy)
2340 write_file(rebase_path_strategy(), "%s\n", opts->strategy);
2341 if (opts->xopts_nr > 0)