Fixed certain cast, unused parameter and shadow decl warnings

Change-Id: Ief74a6f2ca27bf8ad8cc542fc04c51b532764a95
Merge topic '14497-fix-compiler-warnings' into next

164ca84 Fixed certain cast, unused parameter and shadow decl warnings