Access of moved variable.
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 of moved variable.
Obsolete function 'alloca' called. In C99 and later it is recommended to use a variable length array instead.
Avoid arithmetic operation on void pointers
Array access out of bounds with a conditions
Obsolete function 'asctime_s' called. It is recommended to use 'strftime' instead.
Assert statement calls a function which may have desired side effects: 'IsAddressInSegment'.
Assigning a pointer to an integer is not portable.
Assert statement modifies variable
Returning an integer in a function with pointer return type is not portable.
Comparison of a boolean expression with an integer other than 0 or 1.
Skipping configuration 'RLIMIT\_AS;RLIMIT\_CPU;RLIMIT\_DATA;RLIMIT\_NPROC;RLIMIT\_VMEM' since the value of 'RLIMIT\_NPROC' is unknown. Use -D if you want to check it. You can use -U to skip it explicitly.
Detect unused variables
Condition is redundant or value is derefenced
Rethrowing exception in an exception
Catching exception in destructor
Function not called with the right arguments
Obsolute function gets() called
Identical condition and return expression
Identical inner 'return' condition is always true.
Return value not used
Logical conjunction always evaluates to false
Integer overflow with condition
Format string conversion error
Invalid pointer cast
Invalid formatter for float
Invalid formatter for signed long long
Invalid formatter for unsigned int
Invalid scanf for int
Invalid test for overflow
Argument value is always known, could use a const
return value of function not stored
Direct string comparison. Compare with strcmp() instead
Iterators to containers from different expressions
Using NaN/Inf in a computation.
Negative index access
Class does not have a copy constructor which is recommended since it has dynamic memory/resource allocation(s).
Class does not have a destructor which is recommended since it has dynamic memory/resource allocation(s).
Class does not have a operator= which is recommended since it has dynamic memory/resource allocation(s).
Either the condition is redundant or there is overflow in pointer subtraction.
Either the condition is redundant or there is possible null pointer dereference
The address of local variable might be accessed at non-zero index.
Invalid equal operator
operator=' should return reference to 'this' instance.
operator=' should check for assignment to self to avoid problems with dynamic memory.
Member variable is not assigned a value
Opposite inner 'return' condition leads to a dead code block.
Size of pointer used instead of size of its data.
Variable is reassigned a value before the old one has been used
Same iterators expression are used for algorithm.
Repositioning operation performed on a file opened in append mode has no effect.
Redundant assignment of variable to itself.
Shifting a negative value is technically undefined behaviour
Expression can have a negative value. That is converted to an unsigned value and used in an unsigned calculation.
Calculation inside sizeof().
Division by result of sizeof(). memset() expects a size in bytes
Unnecessary comparison of static strings.
Member variable not initialized in the constructor.
Member private variable is not initialized in the constructor.
Instance of object is destroyed immediately.
Assignment of function parameter has no effect outside the function. Did you forget dereferencing it?
Ineffective call of function 'empty()'. Call 'clear()' instead.
Passing NULL after the last typed argument to a variadic function leads to undefined behaviour.
Dynamic binding is not used.
Using std::move for returning object by-value from function will affect copy elision optimization