can detect violations of this rule with CERT C Rule Pack
Section
Compass/ROSE
Section
can detect some violations of this rule. In particular, it ensures that all operations involving division or modulo are preceded by a check ensuring that the second operand is non-zero.