diff options
author | Abseil Team <absl-team@google.com> | 2023-05-05 18:04:05 (GMT) |
---|---|---|
committer | Copybara-Service <copybara-worker@google.com> | 2023-05-05 18:05:02 (GMT) |
commit | bc860af08783b8113005ca7697da5f5d49a8056f (patch) | |
tree | f8a14497fa0488f3e4ca3a6cd0ef81d7e765735a /googletest | |
parent | a3580180d16923d6d5f488e20b3814608a892f17 (diff) | |
download | googletest-bc860af08783b8113005ca7697da5f5d49a8056f.zip googletest-bc860af08783b8113005ca7697da5f5d49a8056f.tar.gz googletest-bc860af08783b8113005ca7697da5f5d49a8056f.tar.bz2 |
This trips up when compiling with -Wvla otherwise.
PiperOrigin-RevId: 529762901
Change-Id: I6ce4d630191bf265f847aef2d5dcc12a712faa60
Diffstat (limited to 'googletest')
-rw-r--r-- | googletest/src/gtest-port.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/googletest/src/gtest-port.cc b/googletest/src/gtest-port.cc index 77b618c..2aaf2bc 100644 --- a/googletest/src/gtest-port.cc +++ b/googletest/src/gtest-port.cc @@ -199,8 +199,8 @@ size_t GetThreadCount() { mib[5] = static_cast<int>(size / static_cast<size_t>(mib[4])); // populate array of structs - struct kinfo_proc info[mib[5]]; - if (sysctl(mib, miblen, &info, &size, NULL, 0)) { + std::vector<struct kinfo_proc> info(mib[5]); + if (sysctl(mib, miblen, info.data(), &size, NULL, 0)) { return 0; } |