michael-hartmann / caps

The Casimir Effect in the plane-sphere geometry.
GNU General Public License v2.0
4 stars 1 forks source link

Initialize variables #156

Closed michael-hartmann closed 4 years ago

michael-hartmann commented 4 years ago

This PR addresses issue #149.

The functions dqagi and dqags are from CQUADPACK which is a port of the Fortran77 library QUADPACK to C. The code contains a lot of gotos that make it hard to understand the program flow. I have checked with clang's undefined behavior and address sanitizer that the variables are not used uninitialised (no uninitialized variable is read while executing the tests). My best guess is that the logic was correct but too hard for the compiler to understand.

However, to prevent any reads of an uninitialized variable and to avoid compiler warnings, all variables are now initialized to 0.