Get rid of warnings and deprecation suppression.

Patchset 2: Rebase

Change-Id: Icc39322eceb731238bf6dc8883c5e49d1468c2d0