Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

src: avoid unused variables and functions #45542

Merged
merged 1 commit into from Nov 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/inspector_agent.cc
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
Expand Up @@ -222,7 +222,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
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