]> git.ipfire.org Git - thirdparty/git.git/commit - notes.c
git-compat-util.h: use "UNUSED", not "UNUSED(var)"
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Thu, 25 Aug 2022 17:09:48 +0000 (19:09 +0200)
committerJunio C Hamano <gitster@pobox.com>
Thu, 1 Sep 2022 17:49:48 +0000 (10:49 -0700)
commit5cf88fd8b059235b21ee2f72b17bf1f421a9c4e7
tree03de8d4160649a0b4c1dd79164d746206743f25d
parent776515ef8b381d49caeccfe2e8da98cb666e257a
git-compat-util.h: use "UNUSED", not "UNUSED(var)"

As reported in [1] the "UNUSED(var)" macro introduced in
2174b8c75de (Merge branch 'jk/unused-annotation' into next,
2022-08-24) breaks coccinelle's parsing of our sources in files where
it occurs.

Let's instead partially go with the approach suggested in [2] of
making this not take an argument. As noted in [1] "coccinelle" will
ignore such tokens in argument lists that it doesn't know about, and
it's less of a surprise to syntax highlighters.

This undoes the "help us notice when a parameter marked as unused is
actually use" part of 9b240347543 (git-compat-util: add UNUSED macro,
2022-08-19), a subsequent commit will further tweak the macro to
implement a replacement for that functionality.

1. https://lore.kernel.org/git/220825.86ilmg4mil.gmgdl@evledraar.gmail.com/
2. https://lore.kernel.org/git/220819.868rnk54ju.gmgdl@evledraar.gmail.com/

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
93 files changed:
add-interactive.c
archive-tar.c
archive-zip.c
archive.c
attr.c
bisect.c
bloom.c
builtin/am.c
builtin/bisect--helper.c
builtin/checkout.c
builtin/commit-graph.c
builtin/config.c
builtin/describe.c
builtin/difftool.c
builtin/fast-export.c
builtin/fast-import.c
builtin/fetch.c
builtin/fsck.c
builtin/gc.c
builtin/log.c
builtin/ls-tree.c
builtin/multi-pack-index.c
builtin/name-rev.c
builtin/pack-objects.c
builtin/receive-pack.c
builtin/reflog.c
builtin/remote.c
builtin/repack.c
builtin/rev-parse.c
builtin/show-branch.c
builtin/show-ref.c
builtin/stash.c
builtin/submodule--helper.c
color.c
commit-graph.c
commit.c
compat/terminal.c
config.c
convert.c
delta-islands.c
diff.c
dir.c
environment.c
fetch-pack.c
git-compat-util.h
gpg-interface.c
hashmap.c
help.c
http-backend.c
ident.c
ll-merge.c
log-tree.c
ls-refs.c
merge-recursive.c
name-hash.c
negotiator/default.c
negotiator/skipping.c
notes.c
object-name.c
object-store.h
oidmap.c
packfile.c
pager.c
patch-ids.c
pretty.c
range-diff.c
ref-filter.c
reflog.c
refs.c
refs/files-backend.c
refs/iterator.c
refs/packed-backend.c
remote.c
replace-object.c
revision.c
send-pack.c
sequencer.c
server-info.c
shallow.c
strbuf.c
streaming.c
strmap.c
sub-process.c
submodule-config.c
submodule.c
t/helper/test-config.c
t/helper/test-ref-store.c
t/helper/test-userdiff.c
trailer.c
transport.c
upload-pack.c
walker.c
wt-status.c