summaryrefslogtreecommitdiff
path: root/builtin/merge.c
diff options
context:
space:
mode:
authorLibravatar Carlo Marcelo Arenas Belón <carenas@gmail.com>2021-09-02 04:52:53 -0400
committerLibravatar Junio C Hamano <gitster@pobox.com>2021-09-02 13:13:19 -0700
commit6540b716140784f329de7bac954d2651e9d3e321 (patch)
tree1174413f83321e11bf75b2d14b2fcc0ab0cb3f67 /builtin/merge.c
parentGit 2.33 (diff)
downloadtgif-6540b716140784f329de7bac954d2651e9d3e321.tar.xz
remote: avoid -Wunused-but-set-variable in gcc with -DNDEBUG
In make_remote(), we store the return value of hashmap_put() and check it using assert(), but don't otherwise use it. If Git is compiled with NDEBUG, then the assert() becomes a noop, and nobody looks at the variable at all. This causes some compilers to produce warnings. Let's switch it instead to a BUG(). This accomplishes the same thing, but is always compiled in (and we don't have to worry about the cost; the check is cheap, and this is not a hot code path). Signed-off-by: Carlo Marcelo Arenas Belón <carenas@gmail.com> Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/merge.c')
0 files changed, 0 insertions, 0 deletions