Various SCA fixes

Various SCA fixes from cppcheck incl.:
* pass const parameter by reference
* use empty() over size() 
* perform init in initialization list
* prefer prefix ++operator for non-primitive types
* remove check for >=0 for unsigned variables
* reduce scope of variables
* remove unused variables
* correct format specifier
* suppress some cppcheck warnings