mbox series

[v3,0/5] add missing __attribute__((format))

Message ID cover-0.5-0000000000-20210714T001433Z-avarab@gmail.com (mailing list archive)
Headers show
Series add missing __attribute__((format)) | expand

Message

Ævar Arnfjörð Bjarmason July 14, 2021, 12:15 a.m. UTC
Adds missing add missing __attribute__((format)) in various places,
which improves compile-time checking.

v3: Dropped the 6th patch per feedback from Jeff King. Yes, we can do
without that strftime() comment in strbuf.c.

v2 at: https://lore.kernel.org/git/cover-0.6-0000000000-20210713T080411Z-avarab@gmail.com/

Ævar Arnfjörð Bjarmason (5):
  *.c static functions: don't forward-declare __attribute__
  sequencer.c: move static function to avoid forward decl
  *.c static functions: add missing __attribute__((format))
  *.h: add a few missing  __attribute__((format))
  advice.h: add missing __attribute__((format)) & fix usage

 add-patch.c                                   |  1 +
 advice.h                                      |  1 +
 builtin/am.c                                  |  1 +
 builtin/bisect--helper.c                      |  2 +
 builtin/index-pack.c                          |  4 +-
 builtin/receive-pack.c                        |  5 +--
 cache.h                                       |  1 +
 commit-graph.c                                |  1 +
 .../osxkeychain/git-credential-osxkeychain.c  |  1 +
 .../wincred/git-credential-wincred.c          |  1 +
 gettext.c                                     |  1 +
 imap-send.c                                   |  3 ++
 mailmap.c                                     |  1 +
 merge-ort.c                                   |  1 +
 merge-recursive.c                             |  1 +
 midx.c                                        |  1 +
 quote.h                                       |  1 +
 ref-filter.c                                  |  1 +
 sequencer.c                                   | 43 +++++++++----------
 server-info.c                                 |  1 +
 strbuf.h                                      |  1 +
 t/helper/test-advise.c                        |  2 +-
 worktree.c                                    |  1 +
 23 files changed, 47 insertions(+), 29 deletions(-)

Range-diff against v2:
1:  a855bfceb2 = 1:  a855bfceb2 *.c static functions: don't forward-declare __attribute__
2:  9c1492b006 = 2:  9c1492b006 sequencer.c: move static function to avoid forward decl
3:  e2e039f481 = 3:  e2e039f481 *.c static functions: add missing __attribute__((format))
4:  fd70d512b4 = 4:  fd70d512b4 *.h: add a few missing  __attribute__((format))
5:  a001e851d2 = 5:  a001e851d2 advice.h: add missing __attribute__((format)) & fix usage
6:  fe66e06754 < -:  ---------- strbuf.h: add a comment about "missing" strftime() checking

Comments

Junio C Hamano July 14, 2021, 4:07 p.m. UTC | #1
Ævar Arnfjörð Bjarmason  <avarab@gmail.com> writes:

> Adds missing add missing __attribute__((format)) in various places,
> which improves compile-time checking.
>
> v3: Dropped the 6th patch per feedback from Jeff King. Yes, we can do
> without that strftime() comment in strbuf.c.

OK.  I am OK with or without it, but let's take this version and
merge it down.

Thanks.