Try a better cleanup for cppcheck diagnostics on 'error' going unused.