]> git.ipfire.org Git - thirdparty/git.git/commit - sequencer.c
sequencer: cleanup for gcc warning in non developer mode
authorCarlo Marcelo Arenas Belón <carenas@gmail.com>
Thu, 25 Oct 2018 09:38:54 +0000 (02:38 -0700)
committerJunio C Hamano <gitster@pobox.com>
Sat, 27 Oct 2018 06:00:31 +0000 (15:00 +0900)
commit4af5174168f8f08c063fd24f8626f406feacacc5
tree54055dde2fe917155ab164b402b4a01176f9f3d2
parent34b47315d9721a576b9536492cca0c11588113a2
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>
sequencer.c