ax_code_coverage: need to fix warnings for deprecated branch_coverage options

Simon Sobisch <[email protected]> Tue, 27 May 2025 17:36:57 +0200
Newsgroups gmane.comp.sysutils.autoconf.archive-maintainers
Message-ID <[email protected]>
The current version does work on lcov 1.16 and lcov 2.01; the later 
issues warnings though:

geninfo: WARNING: RC option 'lcov_branch_coverage' is deprecated. 
Consider using 'branch_coverage. instead.  (Backward-compatible support 
will be removed in the future
genhtml: WARNING: RC option 'genhtml_branch_coverage' is deprecated. 
Consider using 'branch_coverage. instead.  (Backward-compatible support 
will be removed in the future

Just changing the the passed --rc to pass the option without the lcov_ 
and genthml_ prefixes removes the warning in lcov >2, but also leads to 
lcov 1.16 not issuing any warning/error and not doing the branch coverage.

ax_code_coverage already checks for lcov - please let it also check the 
lcov version and adjust this if the main version is not 1 (by chance 
I've just found that is what meson changed October 2023).


Also: switching to newer versions brought in a lot of errors like this:
geninfo: WARNING: /home/build/gnucobol/libcob/numeric.c:469: unexecuted 
block on non-branch line with non-zero hit count.  Use "geninfo --rc 
geninfo_unexecuted_blocks=1 to set count to zero.
	(use "geninfo --ignore-errors gcov,gcov ..." to suppress this warning)

Is that an lcov or gcc (codegen) bug?

Would there be a reason to not add
     --rc geninfo_unexecuted_blocks=1
to CODE_COVERAGE_LCOV_OPTIONS_DEFAULT?



BTW: there are several changes over the last years, but the copyright 
dates were not updates - maybe add a separate FSF line listing the 
missing years (or better: fix the existing ones)? I was confused and 
thought "that's old", but 2019 is _not_ when the last changes were done...


Thank you,
Simon