On Wed, Sep 13, 2017 at 9:57 PM, Niels Möller nisse@lysator.liu.se wrote:
nisse@lysator.liu.se (Niels Möller) writes:
Rewriting using do {} while loop would make some sense, to make it clear both to the analyzer and to humans that loops are intended to run at least once.
With the below patch, the static analyzer stops complaining when I run it locally. I still get two reports for --enable-mini-gmp, though, for the tq adjustments in mpz_div_qr, which I think are false positives. I'm running scan-build from debian's clang-3.9 package.
Question is if the patch is more or less ugly than adding an
#ifdef __clang_analyzer__ hi = 0; #endif
Seems good I think. Maybe with a comment on why this was added.
regards, Nikos