fix: add missing [[maybe_unused]] to IsEnvSet (#33224)

This commit is contained in:
Milan Burda 2022-03-14 10:19:15 +01:00 committed by GitHub
parent f372953256
commit 039c061d07
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -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';
}

View file

@ -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;