Browse Source

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

Co-authored-by: Milan Burda <[email protected]>
trop[bot] 3 years ago
parent
commit
90726a46e1
2 changed files with 2 additions and 2 deletions
  1. 1 1
      shell/app/electron_main_mac.cc
  2. 1 1
      shell/app/electron_main_win.cc

+ 1 - 1
shell/app/electron_main_mac.cc

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

+ 1 - 1
shell/app/electron_main_win.cc

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