Skip to content

Commit e4ff553

Browse files
author
Kim Barrett
committed
8341931: os_linux gtest uses lambdas with explicit capture lists
Reviewed-by: jwaters, jsjolen
1 parent e94e3bb commit e4ff553

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/hotspot/gtest/runtime/test_os_linux.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -360,10 +360,10 @@ TEST_VM(os_linux, pretouch_thp_and_use_concurrent) {
360360
EXPECT_TRUE(os::commit_memory(heap, size, false));
361361

362362
{
363-
auto pretouch = [heap](Thread*, int) {
363+
auto pretouch = [&](Thread*, int) {
364364
os::pretouch_memory(heap, heap + size, os::vm_page_size());
365365
};
366-
auto useMemory = [heap](Thread*, int) {
366+
auto useMemory = [&](Thread*, int) {
367367
int* iptr = reinterpret_cast<int*>(heap);
368368
for (int i = 0; i < 1000; i++) *iptr++ = i;
369369
};

0 commit comments

Comments
 (0)