coverity#705400 Argument cannot be negative

Change-Id: Idfd95810f929d6485263c0a4fb1e24bfa31c48f8
coverity#737047 Uncaught exception

Change-Id: Icdb50f632654f0e46c41fa3e98741a00dfbc0feb
coverity#982486 Unchecked dynamic_cast

Change-Id: I241300f05ab537f2ab89d15f06ce6c04ffec14b5
coverity#1130446 Uncaught exception

Change-Id: I9225b4ffd507fa3d666862a55dae349c9a76e91d
coverity#1169809 regression on long->bool

regression since 04683f14883f4cd64febadd71b327639f1e7edcc
apparently

Change-Id: I35b154dafd9534fb8234a82683cb3e879e136834
coverity#1169810 Logically dead code

Change-Id: I565b3fc948c66a7b8e9815cf746714f9a2a70267
coverity#1169818 Dereference after null check

Change-Id: Ie8afd01a36b797ef7733f1cdd36775ff086a278a
coverity#169849 Uncaught exception

Change-Id: I7c41fcd5be19ed9a0ba7e06920da4eadd0ea15a9