Skip to content

Commit

Permalink
Fix an uninitialized variable in GeographicLib. (JSBSim-Team#1173)
Browse files Browse the repository at this point in the history
  • Loading branch information
bcoconni authored Oct 26, 2024
1 parent 65acca5 commit c587d54
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/GeographicLib/Geodesic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ namespace GeographicLib {
// check, e.g., on verifying quadrants in atan2. In addition, this
// enforces some symmetries in the results returned.

real sbet1, cbet1, sbet2, cbet2, s12x, m12x;
real sbet1, cbet1, sbet2, cbet2, s12x, m12x = Math::NaN();

Math::sincosd(lat1, sbet1, cbet1); sbet1 *= _f1;
// Ensure cbet1 = +epsilon at poles; doing the fix on beta means that sig12
Expand Down
2 changes: 1 addition & 1 deletion src/JSBSim.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ int main(int argc, char* argv[])
_controlfp(_controlfp(0, 0) & ~(_EM_INVALID | _EM_ZERODIVIDE | _EM_OVERFLOW),
_MCW_EM);
#elif defined(__GNUC__) && !defined(sgi) && !defined(__APPLE__)
feenableexcept(FE_DIVBYZERO | FE_INVALID);
feenableexcept(FE_DIVBYZERO | FE_INVALID | FE_OVERFLOW);
#endif

try {
Expand Down

0 comments on commit c587d54

Please sign in to comment.