From 86cc2c66a76be7c8bb9246d760708b6ea2ee2f2d Mon Sep 17 00:00:00 2001 From: Michael Richters Date: Thu, 20 May 2021 23:52:33 -0500 Subject: [PATCH] Suppress warnings when expecting no report without comment Signed-off-by: Michael Richters --- testing/bin/ktest-to-cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/testing/bin/ktest-to-cxx b/testing/bin/ktest-to-cxx index f9d76f1e..3b7d6f0e 100644 --- a/testing/bin/ktest-to-cxx +++ b/testing/bin/ktest-to-cxx @@ -375,7 +375,9 @@ sub generate_expect_report { $reports_expected++; if ( $report->{data}->{count} == 0 ) { - cxx_comment( $report->{comment} ); + if ( $report->{comment} ) { + cxx_comment( $report->{comment} ); + } cxx_comment( "We don't expect any report here, and have told the tests to check that" );