build: Fix a whole bunch of warnings

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