facebook pixelCodiga Analysis C / C++ Rules, severity informational , category safety
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.

assignBoolToFloat

Safety
Informational

Boolean value assigned to floating point variable.

moduloofone

Safety
Informational

Modulo of one is always equal to zero

pointerLessThanZero

Safety
Informational

A pointer can not be negative so it is either pointless or an error to check if it is.

redundantIfRemove

Safety
Informational

Redundant checking of STL container element existence before removing it.

returnNonBoolInBooleanFunction

Safety
Informational

Non-boolean value returned from function returning bool

truncLongCastAssignment

Safety
Informational

int result is assigned to long variable. If the variable is long to avoid loss of information