facebook pixelC and C++ Static Code Analysis Rules
BACK TO LIST

C / C++ rules

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.

ConfigurationNotChecked

Best practice
Minor

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.

exceptRethrowCopy

Best practice
Minor

Rethrowing exception in an exception

knownArgument

Best practice
Minor

Argument value is always known, could use a const

nanInArithmeticExpression

Best practice
Minor

Using NaN/Inf in a computation.

operatorEq

Best practice
Minor

Invalid equal operator

operatorEqRetRefThis

Best practice
Minor

operator=' should return reference to 'this' instance.

sameIteratorExpression

Best practice
Minor

Same iterators expression are used for algorithm.

unusedScopedObject

Best practice
Minor

Instance of object is destroyed immediately.

legacyUninitvar

Best practice
Minor

Uninitialized variable