mirror of
https://github.com/electron/electron.git
synced 2026-01-09 15:38:08 -05:00
fix: add missing [[maybe_unused]] to IsEnvSet (#33224)
This commit is contained in:
@@ -20,7 +20,7 @@
|
||||
|
||||
namespace {
|
||||
|
||||
bool IsEnvSet(const char* name) {
|
||||
[[maybe_unused]] bool IsEnvSet(const char* name) {
|
||||
char* indicator = getenv(name);
|
||||
return indicator && indicator[0] != '\0';
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@ namespace {
|
||||
const char kUserDataDir[] = "user-data-dir";
|
||||
const char kProcessType[] = "type";
|
||||
|
||||
bool IsEnvSet(const char* name) {
|
||||
[[maybe_unused]] bool IsEnvSet(const char* name) {
|
||||
size_t required_size;
|
||||
getenv_s(&required_size, nullptr, 0, name);
|
||||
return required_size != 0;
|
||||
|
||||
Reference in New Issue
Block a user