I recently learned about Clang's scan-build tool for identifying bugs and ran the following on my OpenBSD amd64/7.5-stable workstation:
scan-build-16 -o tmp/scan-build make -j4
Which identified 29 bugs, including:
- (x6) Dereference of null pointer
- (x1) Garbage return value
- (x1) Result of operation is garbage or undefined
- (x1) Uninitialized argument value
- (x1) Unix API
- (x1) Memory leak
- (x2) Allocator sizeof operand mismatch
- (x14) Dead assignment
- (x2) Dead nested assignment
mlvwm - scan-build results.pdf