Sweeping !4623 from 21.0 to master. Fix minor build warnings in build of HitAnalysis package See merge request !4688 Former-commit-id: ddbc6812