| 1668 | } |
| 1669 | |
| 1670 | static bool isCastToVoid(const Variable* var) |
| 1671 | { |
| 1672 | if (!var) |
| 1673 | return false; |
| 1674 | if (!var->scope()) |
| 1675 | return false; |
| 1676 | for (const Token* tok = var->scope()->bodyStart; tok != var->scope()->bodyEnd; tok = tok->next()) { |
| 1677 | if (tok->varId() != var->declarationId()) |
| 1678 | continue; |
| 1679 | if (isVoidCast(tok->astParent())) |
| 1680 | return true; |
| 1681 | } |
| 1682 | return false; |
| 1683 | } |
| 1684 | |
| 1685 | void CheckOtherImpl::checkConstVariable() |
| 1686 | { |
no test coverage detected