[trivial] add "extern "C"" in headers and fix static analyser error