Merge pull request #5142 from scottfurry/StaticChkFixExamples Resolve static check warnings in example code