Cleanup in ar.cpp - fixes compilation warnings in clang++ and g++

If you are willing to pull in these kind of commits, I'll have several more :) There are no bug fixes in this commit, only changes to make the code compile without warnings, which can of course help to spot real problems more easily (less noise).

(EDIT: changes are tested with MSVC too)