Skip to content

Commit

Permalink
src: avoid unused variables and functions
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
targos authored and danielleadams committed Jan 3, 2023
1 parent 3f5a232 commit 5e63bf3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 2 additions & 0 deletions src/inspector_agent.cc
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,9 @@ using v8_inspector::StringView;
using v8_inspector::V8Inspector;
using v8_inspector::V8InspectorClient;

#ifdef __POSIX__
static uv_sem_t start_io_thread_semaphore;
#endif // __POSIX__
static uv_async_t start_io_thread_async;
// This is just an additional check to make sure start_io_thread_async
// is not accidentally re-used or used when uninitialized.
Expand Down
2 changes: 1 addition & 1 deletion src/node_binding.cc
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ static bool libc_may_be_musl() {
has_cached_retval = true;
return retval;
}
#else // __linux__
#elif defined(__POSIX__)
static bool libc_may_be_musl() { return false; }
#endif // __linux__

Expand Down
6 changes: 3 additions & 3 deletions src/node_credentials.cc
Original file line number Diff line number Diff line change
Expand Up @@ -456,12 +456,12 @@ static void Initialize(Local<Object> target,
Local<Value> unused,
Local<Context> context,
void* priv) {
Environment* env = Environment::GetCurrent(context);
Isolate* isolate = env->isolate();

SetMethod(context, target, "safeGetenv", SafeGetenv);

#ifdef NODE_IMPLEMENTS_POSIX_CREDENTIALS
Environment* env = Environment::GetCurrent(context);
Isolate* isolate = env->isolate();

READONLY_TRUE_PROPERTY(target, "implementsPosixCredentials");
SetMethodNoSideEffect(context, target, "getuid", GetUid);
SetMethodNoSideEffect(context, target, "geteuid", GetEUid);
Expand Down

0 comments on commit 5e63bf3

Please sign in to comment.