commit | 066b5d63801e02a0354caa7f4b4f4a4eac7be1ae | [log] [tgz] |
---|---|---|
author | Yi Kong <yikong@google.com> | Fri Dec 08 19:51:45 2023 +0900 |
committer | Yi Kong <yikong@google.com> | Fri Dec 08 19:53:31 2023 +0900 |
tree | c5e61f631476d1dc2b0abfdaf97de7867fafd801 | |
parent | 93e0616836e06cf22da2f21785d20a8e292050db [diff] [blame] |
Fix -Winteger-overflow warning Test: presubmit Change-Id: If9dee7c85efc3d14805c8e3ab85631223adac5ec
diff --git a/tests/semaphore_test.cpp b/tests/semaphore_test.cpp index 5b061be..5558134 100644 --- a/tests/semaphore_test.cpp +++ b/tests/semaphore_test.cpp
@@ -52,7 +52,7 @@ // Too large an initial value. errno = 0; - ASSERT_EQ(-1, sem_init(&s, 0, SEM_VALUE_MAX + 1)); + ASSERT_EQ(-1, sem_init(&s, 0, static_cast<unsigned>(SEM_VALUE_MAX) + 1)); ASSERT_ERRNO(EINVAL); ASSERT_EQ(0, sem_destroy(&s));