trivial: fix various build warnings and errors