Merge "Add required casts for clang/llvm -Wc++11-narrowing"

This commit is contained in:
Chih-Hung Hsieh 2015-01-13 17:38:06 +00:00 committed by Gerrit Code Review
commit ce1928e987
1 changed files with 2 additions and 2 deletions

View File

@ -131,8 +131,8 @@ inline status_t Mutex::tryLock() {
#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);
}