Fix NPE in CxxReportSensor and minor improvements for PC-Lint, compiler, Vera++

Please do not consider the 1st commit.