Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- typedef unsigned long long dgUnsigned64;
- dgUnsigned64 m_mantissa[DG_GOOGOL_SIZE];
- dgGoogol::dgGoogol(dgFloat64 value)
- :m_sign(0)
- ,m_exponent(0)
- {
- ....
- m_mantissa[0] = (dgInt64 (dgFloat64 (
- dgUnsigned64(1)<<62) * mantissa));
- // it looks like GCC have problems with this
- dgAssert (m_mantissa[0] >= 0);
- ....
- }
- This suspicious code was found in Newton Game Dynamics project by PVS-Studio static code analyzer.
- Warning message is:
- V547 Expression 'm_mantissa[0] >= 0' is always true. Unsigned type value is always >= 0. dggoogol.cpp 55
- PVS-Studio is a static analyzer for detecting bugs in the source code of applications written in C, C++, C++11, C++/CX. Site: http://www.viva64.com/en/pvs-studio/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement