summaryrefslogtreecommitdiff
path: root/t/t4252/am-test-1-2
diff options
context:
space:
mode:
authorLibravatar Hans Jerry Illikainen <hji@dyntopia.com>2019-11-27 20:24:11 +0000
committerLibravatar Junio C Hamano <gitster@pobox.com>2019-11-30 14:06:58 -0800
commit867fc7f31010f668e18caa3e0825a36c308d3e3b (patch)
tree3cafc64a7ea1cfa6b9f505954fba87565883cc2b /t/t4252/am-test-1-2
parentThe first batch post 2.24 cycle (diff)
downloadtgif-867fc7f31010f668e18caa3e0825a36c308d3e3b.tar.xz
grep: don't return an expression from pcre2_free()
Previously, the void pcre2_free() function in grep.c returned free(). While free() itself is void, afaict it's still an expression as per section A.2.3, subsection 6.8.6 (jump-statement) in both C99 [1] and C11 [2]: > return expression Section 6.8.6.4 in C99 [1] and C11 [2] says that: > A return statement with an expression shall not appear in a function > whose return type is void. The consequence of the old behavior was that developer builds with pedantic errors enabled broke Git if PCRE2 was enabled and a smart-enough compiler to detect these errors was used. This commit fixes pedantic builds of Git that enables --with-libpcre. [1] http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1256.pdf [2] http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1548.pdf Signed-off-by: Hans Jerry Illikainen <hji@dyntopia.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4252/am-test-1-2')
0 files changed, 0 insertions, 0 deletions