Skip to content

Commit 5e63bf3

Browse files
targosdanielleadams
authored andcommitted
src: avoid unused variables and functions
PR-URL: #45542 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
1 parent 3f5a232 commit 5e63bf3

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

src/inspector_agent.cc

+2
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,9 @@ using v8_inspector::StringView;
5252
using v8_inspector::V8Inspector;
5353
using v8_inspector::V8InspectorClient;
5454

55+
#ifdef __POSIX__
5556
static uv_sem_t start_io_thread_semaphore;
57+
#endif // __POSIX__
5658
static uv_async_t start_io_thread_async;
5759
// This is just an additional check to make sure start_io_thread_async
5860
// is not accidentally re-used or used when uninitialized.

src/node_binding.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ static bool libc_may_be_musl() {
229229
has_cached_retval = true;
230230
return retval;
231231
}
232-
#else // __linux__
232+
#elif defined(__POSIX__)
233233
static bool libc_may_be_musl() { return false; }
234234
#endif // __linux__
235235

src/node_credentials.cc

+3-3
Original file line numberDiff line numberDiff line change
@@ -456,12 +456,12 @@ static void Initialize(Local<Object> target,
456456
Local<Value> unused,
457457
Local<Context> context,
458458
void* priv) {
459-
Environment* env = Environment::GetCurrent(context);
460-
Isolate* isolate = env->isolate();
461-
462459
SetMethod(context, target, "safeGetenv", SafeGetenv);
463460

464461
#ifdef NODE_IMPLEMENTS_POSIX_CREDENTIALS
462+
Environment* env = Environment::GetCurrent(context);
463+
Isolate* isolate = env->isolate();
464+
465465
READONLY_TRUE_PROPERTY(target, "implementsPosixCredentials");
466466
SetMethodNoSideEffect(context, target, "getuid", GetUid);
467467
SetMethodNoSideEffect(context, target, "geteuid", GetEUid);

0 commit comments

Comments
 (0)