Fix LLVM warnings and OpenBSD build failures