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
Got a build error with -Werror=return-type enabled
folly/folly/settings/Types.cpp: In function ‘std::string_view folly::settings::toString(folly::settings::SetErrorCode)’:
folly/folly/settings/Types.cpp:31:1: error: control reaches end of non-void function [-Werror=return-type]
The text was updated successfully, but these errors were encountered:
std::string_view folly::settings::toString(folly::settings::SetErrorCode error)
{
switch (error)
{
case SetErrorCode::kSuccess:
return "kSuccess";
case SetErrorCode::kError:
return "kError";
// add a program
}
// Default return (if program doesn't match)
return "Unknown Error";
}
Function of: toString(folly::settings::SetErrorCode) is expected to return a value of type std::string_view . Therefore, we need to ensure that all execution paths within the function return a value
Got a build error with -Werror=return-type enabled
folly/folly/settings/Types.cpp: In function ‘std::string_view folly::settings::toString(folly::settings::SetErrorCode)’:
folly/folly/settings/Types.cpp:31:1: error: control reaches end of non-void function [-Werror=return-type]
The text was updated successfully, but these errors were encountered: