diff options
author | Carlo Marcelo Arenas Belón <carenas@gmail.com> | 2021-09-02 04:52:53 -0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-09-02 13:13:19 -0700 |
commit | 6540b716140784f329de7bac954d2651e9d3e321 (patch) | |
tree | 1174413f83321e11bf75b2d14b2fcc0ab0cb3f67 /t/t5308-pack-detect-duplicates.sh | |
parent | Git 2.33 (diff) | |
download | tgif-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 't/t5308-pack-detect-duplicates.sh')
0 files changed, 0 insertions, 0 deletions