Platform: Fix issues of cppcheck under platform/ext/common.

As programming issues found in static check, those issues
shall be fixed to make code more stable.

Signed-off-by: Chendi Sun <chendi.sun@arm.com>
Change-Id: I17e7bc0682f3d5ea9933ebb67e9ebd14cda12a0a
17 files changed