calc.cpp: minor changes to remove compiler warnings