On Tue, 29 Jan 2013, Danny Al-Gaaf wrote:
> Hi,
>
> could someone cherry-pick this patch to the bobtail branch? I see the
> same issue there.
Cherry-picked, thanks!
s
>
> Thanks!
>
> Danny
>
>
> Am 27.01.2013 21:57, schrieb Danny Al-Gaaf:
> > 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 <[email protected]>
> > ---
> > 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);
> > }
> >
> >
>
>
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html