am ce1928e9: Merge "Add required casts for clang/llvm -Wc++11-narrowing"
* commit 'ce1928e987923a276ff048c69d9a6f43f22610ba':
Add required casts for clang/llvm -Wc++11-narrowing
diff --git a/include/utils/Mutex.h b/include/utils/Mutex.h
index 4fdd27f..a3b594d 100644
--- a/include/utils/Mutex.h
+++ b/include/utils/Mutex.h
@@ -131,8 +131,8 @@
#if HAVE_ANDROID_OS
inline status_t Mutex::timedLock(nsecs_t timeoutNs) {
const struct timespec ts = {
- /* .tv_sec = */ timeoutNs / 1000000000,
- /* .tv_nsec = */ timeoutNs % 1000000000,
+ /* .tv_sec = */ static_cast<time_t>(timeoutNs / 1000000000),
+ /* .tv_nsec = */ static_cast<long>(timeoutNs % 1000000000),
};
return -pthread_mutex_timedlock(&mMutex, &ts);
}