diff options
author | Andrei Vagin <avagin@google.com> | 2019-01-14 16:11:13 -0800 |
---|---|---|
committer | Shentubot <shentubot@google.com> | 2019-01-14 16:13:14 -0800 |
commit | 343ebe9789087b099ea7feae19879f5c24e59bf1 (patch) | |
tree | eb424461eabd0f04c41672f44763d31995fc8de2 /test/syscalls/linux/priority.cc | |
parent | a46b6d453d198b96949342a81750114bfa5a5429 (diff) |
Fix a few compilation warnings
test/syscalls/linux/wait.cc:626:8: warning: lambda capture 'this' is not
used
302
[this, stack] { ASSERT_THAT(FreeStack(stack), SyscallSucceeds()); });
303
^~~~~
test/syscalls/linux/priority.cc:195:17: warning: lambda capture
'kParentPriority' is not required to be captured for this use
273
ScopedThread([kParentPriority, kChildPriority]() {
274
^~~~~~~~~~~~~~~~
PiperOrigin-RevId: 229275900
Change-Id: I6f0c88efc7891c6c729378a2fa70f70b1b9046a7
Diffstat (limited to 'test/syscalls/linux/priority.cc')
-rw-r--r-- | test/syscalls/linux/priority.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/test/syscalls/linux/priority.cc b/test/syscalls/linux/priority.cc index 69a58a422..3906c7132 100644 --- a/test/syscalls/linux/priority.cc +++ b/test/syscalls/linux/priority.cc @@ -192,7 +192,7 @@ TEST(GetpriorityTest, CloneMaintainsPriority) { ASSERT_THAT(setpriority(PRIO_PROCESS, getpid(), kParentPriority), SyscallSucceeds()); - ScopedThread([kParentPriority, kChildPriority]() { + ScopedThread th([]() { // Check that priority equals that of parent thread pid_t my_tid; EXPECT_THAT(my_tid = syscall(__NR_gettid), SyscallSucceeds()); @@ -203,6 +203,7 @@ TEST(GetpriorityTest, CloneMaintainsPriority) { EXPECT_THAT(setpriority(PRIO_PROCESS, my_tid, kChildPriority), SyscallSucceeds()); }); + th.Join(); // Check that parent's priority reemained the same even though // the child's priority was altered |