LL050
Potential division by zero
Object Pascal — Delphi & Free Pascal
Warning
Reliability
Dividing by a variable without a zero guard risks runtime exceptions
dividing by a variable without a zero guard risks runtime exceptions.
Why this severity
dividing by a variable without a zero guard risks runtime exceptions.
Known false positives
divisors guaranteed non-zero by prior validation or domain logic.
Remediation example
if Divisor <> 0 then Ratio := Total div Divisor else Ratio := 0;