]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
utime: fix narrowing conversion compiler warning in sleep()
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Sun, 27 Jan 2013 20:57:31 +0000 (21:57 +0100)
committerSage Weil <sage@inktank.com>
Tue, 29 Jan 2013 21:59:17 +0000 (13:59 -0800)
commite4d76cb8594c0ec901f89c2f2e8cc53e00eb2a06
tree00e62a5948690883fff7430fcc251d7f75d7c5fc
parenta8964107ddf02ac4a6707a997e1b634c1084a3b9
utime: fix narrowing conversion compiler warning in sleep()

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-gaaf@bisect.de>
(cherry picked from commit 014fc6d6c1c68e2e3ad0117d08c4e46e4030d49e)
src/include/utime.h