Fix most AMP warnings.

Authored-by: David Luposchainsky <dluposchainsky@gmail.com>
Signed-off-by: Austin Seipp <aseipp@pobox.com>