Fix clang compilation warnings and a link failure.