Fix compiler warnings due to auto x = 0

- Fixed problems found by `grep -R -n "auto.*=\\s*[0-9]" . --include="*.cpp"`
Merge pull request #1041 from drltc/fixautonum

Fix compiler warnings due to auto x = 0