arrayIndexThenCheck
Access array beyond boundaries
C and C++ are really performant languages and can be very error-prone. We all had core dumps and made pointer arithmetic errors! Thankfully, Codiga has hundreds of static analysis rules to flag potential errors in your C/C++ code, automate code reviews and merge with confidence.
Access array beyond boundaries
Obsolete function 'std::asctime' called. It is recommended to use 'strftime' instead.
Exception should be caught by reference.
Clarify calculation precedence for '+' and '?'.
Suspicious condition (bitwise operator + comparison)
Detect conditions that are always true
Argument 'false&&static\_cast<bool>(!!(desc.version()==100))' to function isTrue is always 0
Detect variables that could be const
C-style pointer casting
Duplicate assign expression
Consecutive return
Detect duplicate conditions
Duplicate conditions
Duplicate expressions
Duplicate Ternary operator
Duplicate ternary value
Condition value is always known
Function overrides a function in a base class but is not marked with a 'override' specifier.
Expression is always false because 'else if' condition matches previous condition
Class does not have a constructor although it has private member variables.
Class has a constructor with 1 argument that is not explicit.
Opposite expression on both sides of expression
Variable is reassigned a value before the old one has been used.
Redundant condition
Redundant pointer operation on 'CB' - it's already a pointer.
Local variable shadows outer function
Local variable shadows outer variable
Detect variables that are not assigned (e.g. dead code)
Statements following return ; dead code
Public interface is not safe.
Checking if unsigned expression is less than zero.
Unsigned expression can't be negative so it is unnecessary to test it.
Variable is allocated memory that is never used.
Label is not used.
Unused private function
struct member is never used.
Unused variable
Assignment of function parameter has no effect outside the function.
Consider using std::generate algorithm instead of a raw loop.
We use cookies to improve your site experience, including analytics cookies to understand how you use our product and design better experiences. Please read our Cookie Policy.