DanBloomberg / leptonica

Leptonica is an open source library containing software that is broadly useful for image processing and image analysis applications. The official github repository for Leptonica is: danbloomberg/leptonica. See leptonica.org for more documentation.
Other
1.72k stars 384 forks source link

Fixes for MSVC2022 warnings about various lines of code #711

Closed GerHobbelt closed 10 months ago

GerHobbelt commented 10 months ago

(as it says on the tin; see also the commit messages)

Mostly about "possible loss of significant digits" when numeric constants are to be treated as float, several places where the compiler yaks about "possible use of uninitialized variable/pointer" (which could be argued to be due to the analyzer to be slightly retarded/overzealous, as PVS wasn't complaining about most of these but I rather lean towards appeasing that compiler than missing other useful warnings from the same due to this noise cluttering the Output log when building my libraries.

No performance loss, all benign edits as far as I am concerned.

DanBloomberg commented 10 months ago

these changes look reasonable. Did you run the regression tests alltests_reg before/after making them?

DanBloomberg commented 10 months ago

Never mind. I patched and ran the tests.
Four tests failed, all due to the small changes to projective.c, where a double division was replaced by a float division (apparently). The changes in the output are completely insignificant, so it's fine with all your changes.