Address cppcheck warnings and errors in v9_11

Mark Andrews requested to merge marka-cppcheck-v9_11 into v9_11

Merge request reports