| 253 | |
| 254 | |
| 255 | void CheckConditionImpl::mismatchingBitAndError(const Token *tok1, const MathLib::bigint num1, const Token *tok2, const MathLib::bigint num2) |
| 256 | { |
| 257 | std::list<const Token *> locations = { tok1, tok2 }; |
| 258 | |
| 259 | std::ostringstream msg; |
| 260 | msg << "Mismatching bitmasks. Result is always 0 (" |
| 261 | << "X = Y & 0x" << std::hex << num1 << "; Z = X & 0x" << std::hex << num2 << "; => Z=0)."; |
| 262 | |
| 263 | reportError(locations, |
| 264 | Severity::style, |
| 265 | "mismatchingBitAnd", |
| 266 | msg.str(), CWE398, Certainty::normal); |
| 267 | } |
| 268 | |
| 269 | |
| 270 | static void getnumchildren(const Token *tok, std::list<MathLib::bigint> &numchildren) |
no test coverage detected