Fixed some sign-compare and unused variable warnings.

Change-Id: I01f86db2d3c721edde59309546536efe80457d73
Merge topic 'rk-WarningFixes'

b1eb8ba Fixed some sign-compare and unused variable warnings.