Minor fixes for scanner
Clang analyzer appears to ignore function attributes
Add target-specific scan rules