Merge pull request #6929 from paul-elliott-arm/fix_iar_warnings

Backport 2.28: Fix IAR warnings