summaryrefslogtreecommitdiff
path: root/sequencer.c
diff options
context:
space:
mode:
authorCarlo Marcelo Arenas Belón <carenas@gmail.com>2018-10-25 09:38:54 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-10-27 06:00:31 (GMT)
commit4af5174168f8f08c063fd24f8626f406feacacc5 (patch)
tree54055dde2fe917155ab164b402b4a01176f9f3d2 /sequencer.c
parent34b47315d9721a576b9536492cca0c11588113a2 (diff)
downloadgit-4af5174168f8f08c063fd24f8626f406feacacc5.zip
git-4af5174168f8f08c063fd24f8626f406feacacc5.tar.gz
git-4af5174168f8f08c063fd24f8626f406feacacc5.tar.bz2
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>
Diffstat (limited to 'sequencer.c')
-rw-r--r--sequencer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sequencer.c b/sequencer.c
index 8dd6db5..10f602c 100644
--- a/sequencer.c
+++ b/sequencer.c
@@ -2335,7 +2335,7 @@ int write_basic_state(struct replay_opts *opts, const char *head_name,
write_file(rebase_path_quiet(), "\n");
if (opts->verbose)
- write_file(rebase_path_verbose(), "");
+ write_file(rebase_path_verbose(), "%s", "");
if (opts->strategy)
write_file(rebase_path_strategy(), "%s\n", opts->strategy);
if (opts->xopts_nr > 0)