Use alternative comma-swallowing option for LOG and LOGUSER macros to avoid tripping up cppcheck. Clean up cppcheck diagnostics.