scan build fixes