Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- AtomicComparator::ComparisonResult
- IntegerComparator::compare(const Item &o1,
- const AtomicComparator::Operator,
- const Item &o2) const
- {
- const Numeric *const num1 = o1.as<Numeric>();
- const Numeric *const num2 = o1.as<Numeric>();
- if(num1->isSigned() || num2->isSigned())
- ....
- }
- This suspicious code was found in QT project by PVS-Studio static code analyzer.
- Warning message is:
- V656 Variables 'num1', 'num2' are initialized through the call to the same function. It's probably an error or un-optimized code. Consider inspecting the 'o1.as < Numeric > ()' expression. Check lines: 220, 221. qatomiccomparators.cpp 221
- 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