Some fixes are dirty, but it is a start to enforce scan-build on every commit. Signed-off-by: pscott <[email protected]>