When g++ compiles the code, it produces the following warning message.
external/com_github_google_jwt_verify/src/status.cc: In function 'std::string google::jwt_verify::getStatusString(google::jwt_verify::Status)':
external/com_github_google_jwt_verify/src/status.cc:182:1: warning: control reaches end of non-void function [-Wreturn-type]
182 | }
| ^
While clang does not produce the warning when all enum is covered by switch, GNU GCC complains about it. So I initially thought that it is a gcc issue but it seems gcc is correct and they have the FAQ - https://gcc.gnu.org/wiki/VerboseDiagnostics#enum_switch
When
g++
compiles the code, it produces the following warning message.It seems that
return ""
was dropped by recent change - https://github.com/google/jwt_verify_lib/commit/ae1bb0512e67f654bb4e9d741de424547dac801fWhile clang does not produce the warning when all enum is covered by switch, GNU GCC complains about it. So I initially thought that it is a gcc issue but it seems gcc is correct and they have the FAQ - https://gcc.gnu.org/wiki/VerboseDiagnostics#enum_switch
env:
g++ (GCC) 11.3.1 20220421