[PATCH 13/17] scripts/code_cov_parse_info: warn if branch block is not zero
Kamil Konieczny
kamil.konieczny at linux.intel.com
Thu Feb 15 17:19:06 UTC 2024
Hi Mauro,
On 2024-02-15 at 11:27:22 +0100, Mauro Carvalho Chehab wrote:
> From: Mauro Carvalho Chehab <mchehab at kernel.org>
>
> The lcov's info format has a field to be used for report branch
> block. This is unused on json format (newer gcc), being always
> zero. JSON doesn't contain it, so the parser doesn't support
> it to be non-zero anymore. Print a warning if this happens.
>
> Signed-off-by: Mauro Carvalho Chehab <mchehab at kernel.org>
Reviewed-by: Kamil Konieczny <kamil.konieczny at linux.intel.com>
> ---
> scripts/code_cov_parse_info | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/scripts/code_cov_parse_info b/scripts/code_cov_parse_info
> index 50d10a30d7f9..ea4f64b34d2f 100755
> --- a/scripts/code_cov_parse_info
> +++ b/scripts/code_cov_parse_info
> @@ -519,6 +519,10 @@ sub read_info($)
> my $branch = $3;
> my $taken = $4;
>
> + if ($block != 0) {
> + print "Warning: unexpected block $block at line $.\n";
> + }
> +
> my $where = "$ln,$block,$branch";
>
> $taken = 0 if ($taken eq '-');
> --
> 2.43.0
>
More information about the igt-dev
mailing list