Fix or selectively silence warnings in src/components.
Merge pull request #2787 from SimonSapin/warnings

Fix or selectively silence warnings in src/components.