Redone the commit based on the input in https://github.com/godotengine/godot/pull/7851 . Not all warnings were fixed but it's a start.
They do not play well with clang-format which aligns the `//` part with the rest of the code block, thus producing badly indented commented code.
As advised by @reduz, as tests depend on other libs.