WIP: 21.2 build warning fixes
Noticed that there are several compilation warnings in the AthAnalysis build, and this fixes a few of them in the CPAnalysisExamples package. Thanks to @jojungge who advised how the outdated call should be updated.
(First went to master in !32051 (closed) by mistake a few weeks ago, redoing with correct target branch now!)
Best, Christian