flatsurf / e-antic

Embedded algebraic number fields
https://flatsurf.github.io/e-antic/libeantic/
GNU Lesser General Public License v3.0
12 stars 11 forks source link

Silence compiler warnings about unitialized variables #262

Closed saraedum closed 11 months ago

saraedum commented 11 months ago

the evaluation code here uses the variable res as a temporary when it is not aliased. Otherwise, it creates a new temporary. This optimization is probably there for a reason but not only the latest GCC finds this confusing and complains about rres being possibly uninitialized. We try to make this easier to read and get rid of the compiler warning.

Checklist

codecov[bot] commented 11 months ago

Codecov Report

Merging #262 (bfef3f7) into master (731302b) will increase coverage by 0.07%. The diff coverage is 60.00%.

:exclamation: Current head bfef3f7 differs from pull request most recent head 29c4b1b. Consider uploading reports for the commit 29c4b1b to get more accurate results

@@            Coverage Diff             @@
##           master     #262      +/-   ##
==========================================
+ Coverage   92.15%   92.23%   +0.07%     
==========================================
  Files         105      105              
  Lines        2117     2125       +8     
==========================================
+ Hits         1951     1960       +9     
+ Misses        166      165       -1     
Files Coverage Δ
libeantic/src/fmpq_poly_extra/evaluate.c 100.00% <100.00%> (ø)
libeantic/src/fmpz_poly_extra/evaluate.c 41.66% <0.00%> (-3.79%) :arrow_down:

... and 3 files with indirect coverage changes

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more