sws/output: use unsigned variables where harmless overflows are expected.