Fix compiler warning: ./include/utime.h: In member function 'void utime_t::sleep()': ./include/utime.h:139:50: warning: narrowing conversion of '((utime_t*)this)->utime_t::tv.utime_t::<anonymous struct>::tv_sec' from '__u32 {aka unsigned int}' to '__time_t {aka long int}' inside { } is ill-formed in C++11 [-Wnarrowing] ./include/utime.h:139:50: warning: narrowing conversion of '((utime_t*)this)->utime_t::tv.utime_t::<anonymous struct>::tv_nsec' from '__u32 {aka unsigned int}' to 'long int' inside { } is ill-formed in C++11 [-Wnarrowing]
Signed-off-by: Danny Al-Gaaf <danny.al-g...@bisect.de> --- src/include/utime.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/include/utime.h b/src/include/utime.h index 526dec5..f433fff 100644 --- a/src/include/utime.h +++ b/src/include/utime.h @@ -136,7 +136,7 @@ public: } void sleep() { - struct timespec ts = { tv.tv_sec, tv.tv_nsec }; + struct timespec ts = { (__time_t)tv.tv_sec, (long)tv.tv_nsec }; nanosleep(&ts, &ts); } -- 1.8.1.1 -- To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html