Fix compiler and build-scan warnings