You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/home/sonzogna/programmation/download/hyde/emitters/yaml_base_emitter.cpp: In function‘hyde::json {anonymous}::yaml_to_json(const YAML::Node&)’:
/home/sonzogna/programmation/download/hyde/emitters/yaml_base_emitter.cpp:90:1: error: control reaches end of non-void function[-Werror=return-type]
I have the same issue, using clang-9 on Manjaro Linux. After some playing around, I made it compile. There are two issues with this, that are easy to fix.
When using switch statements in the code, a value is returned only inside matched cases. Since no return statement follows the switch block, and no default is defined in the switch, the compiler detects that it can exit from the function with no error.
I solved it by adding returns and throws to 3-4 switches.
However, I'm more concerned about the second issue. Since -Werror=comment is turned on, the compiler complained about a multi-line comment from a header that belongs to LLVM. I edited the header for now but I believe this should be enabled in the CMakeLists.txt.
A build error happens:
Compiler:
cmake version 3.16.20200103-g19c2763
OS:
Screenshots
The text was updated successfully, but these errors were encountered: