Fix compiler error and warnings

This set of commits fixes the clang compiler error and most compiler warnings (wrong const usage, wrongly initialized long_options, not used variables).
Two warnings remaining that I can't test here (in MeterFluke... I only use MeterD0).
No functional change.