Fix compiler warnings due to auto x = 0

- Fixed problems found by `grep -R -n "auto.*=\\s*[0-9]" . --include="*.cpp"`