Commit c811498a authored by aloknnikhil's avatar aloknnikhil Committed by Facebook Github Bot

Add explicit return in the default case (#1250)

Summary:
Fixes cases where control would reach the end of the setThreadName function without an explicit return
Pull Request resolved: https://github.com/facebook/folly/pull/1250

Reviewed By: Orvid

Differential Revision: D18222073

Pulled By: yfeldblum

fbshipit-source-id: 09cbefcc7e2ca80a95d61a4394ed74be8ea8ec55
parent fa452bbf
...@@ -199,11 +199,11 @@ bool setThreadName(std::thread::id tid, StringPiece name) { ...@@ -199,11 +199,11 @@ bool setThreadName(std::thread::id tid, StringPiece name) {
if (pthread_equal(pthread_self(), id)) { if (pthread_equal(pthread_self(), id)) {
return 0 == prctl(PR_SET_NAME, buf, 0L, 0L, 0L); return 0 == prctl(PR_SET_NAME, buf, 0L, 0L, 0L);
} }
#else #endif
(void)id; (void)id;
return false; return false;
#endif #endif
#endif
} }
bool setThreadName(pthread_t pid, StringPiece name) { bool setThreadName(pthread_t pid, StringPiece name) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment