Fix warnings reported by MSVC for the public API