-
Notifications
You must be signed in to change notification settings - Fork 41
Open
Description
Running clang-tidy on macos I get this error:
/Users/matthewzipkin/Desktop/work/bitcoin/src/ipc/libmultiprocess/src/mp/util.cpp:84:25: error: use nullptr [modernize-use-nullptr,-warnings-as-errors]
84 | pthread_threadid_np(NULL, &tid);
| ^~~~
| nullptr
I suspect the reason this hasn't triggered failures on our CI is that this code block is not compiled on linux:
libmultiprocess/src/mp/util.cpp
Lines 80 to 90 in 22bec91
| #ifdef __linux__ | |
| buffer << syscall(SYS_gettid); | |
| #elif defined(HAVE_PTHREAD_THREADID_NP) | |
| uint64_t tid = 0; | |
| pthread_threadid_np(NULL, &tid); | |
| buffer << tid; | |
| #elif defined(HAVE_PTHREAD_GETTHREADID_NP) | |
| buffer << pthread_getthreadid_np(); | |
| #else | |
| buffer << std::this_thread::get_id(); | |
| #endif |
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels