Hi @mcrajah,
Under the hood scan-build works by searching for a compiler to use, overriding CC in the makefile, and then running a static analysis pass with Clang. In your case it looks like it found the wrong compiler (“gcc” instead of “arm-none-eabi-gcc” or “clang”) which is why you are seeing the error.
Can you try using the --use-cc
argument with scan-build to tell it the compiler to exact compiler to use instead: i.e scan-build --use-cc=<path_to_clang>/clang make
?
Thanks for the question, I’ll add a note to the article about it!