Bug Summary

File:div.c
Warning:line 2, column 12
Division by zero

Annotated Source Code

Press '?' to see keyboard shortcuts

clang -cc1 -cc1 -triple x86_64-portbld-freebsd12.2 -analyze -disable-free -disable-llvm-verifier -discard-value-names -main-file-name div.c -analyzer-store=region -analyzer-opt-analyze-nested-blocks -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -setup-static-analyzer -mrelocation-model static -mframe-pointer=all -fno-rounding-math -mconstructor-aliases -munwind-tables -target-cpu x86-64 -tune-cpu generic -fno-split-dwarf-inlining -debugger-tuning=gdb -resource-dir /usr/local/llvm-devel/lib/clang/12.0.0 -fdebug-compilation-dir /usr/home/kai/sanitizers -ferror-limit 19 -fgnuc-version=4.2.1 -analyzer-output=html -faddrsig -o /tmp/scan-build-2021-04-03-224720-1059-1 -x c div.c
1int divbyzero(int a, int b) {
2 return a / b;
3
Division by zero
3}
4
5int bug() {
6 return divbyzero(5, 0);
1
Passing the value 0 via 2nd parameter 'b'
2
Calling 'divbyzero'
7}