coverity#1242627 Use of untrusted scalar value

Change-Id: I81b034859e80507740092b25a7352c19933e8449
Related: coverity#1242658 Untrusted loop bound

Change-Id: Ic785b333c1ad31036da20483dc7310fcc5338d80
coverity#1254674 Unchecked dynamic_cast

Change-Id: Iae62353e42947324beca8d036fcd1c20346d0d29
coverity#735402 Logically dead code

Change-Id: Iafc67b4ccd30afdc2dc1c4fb058f9933fa90185a
coverity#1242675 Untrusted value as argument

Change-Id: I1d8f32095f297919dc3ccab51093295f8c31707d
coverity#1226488 Big parameter passed by value

Change-Id: I55ee5dcd7ed18fe907fc06aba345d96a90fb2324