build: Fix a bunch of warnings

Signed-off-by: Bart Kuivenhoven <bemkuivenhoven@gmail.com>