linux-test-project / lcov

LCOV
GNU General Public License v2.0
866 stars 234 forks source link

genhtml warning use of uninitialized value #268

Closed icsfy closed 4 months ago

icsfy commented 5 months ago

lcov latest git version

genhtml: WARNING: Use of uninitialized value in numeric ne (!=) at bin/genhtml line 1036.

henry2cox commented 5 months ago

Testcase?

henry2cox commented 5 months ago

My code looks a bit different than what you currently have... Could you change the code near your like 1036, to look like:

if ($lineData->in_curr()) { $l->{hit} -= $lineData->curr_count() != 0; $l->{found} -= 1; }

That may make the issue go away. (Sorry about that.)

icsfy commented 5 months ago

Yes, it's working. These warnings disappeared after applying above changes.

henry2cox commented 5 months ago

Ah - good. I will push the fix sometime later this week, or possibly next.

henry2cox commented 5 months ago

Should be fixed in e3f73953c. If the issue is fixed: please go ahead and close it - otherwise, I probably need a testcase.