[Live-devel] Warning on MacOSX

Tim Zaitsev tim at rabbit.tv
Thu Sep 6 16:09:27 PDT 2012


Ross,

Line 73 in DelayQueue.hh throws a warning when compiling for macosx.

include/DelayQueue.hh:73:41: Implicit conversion loses integer precision:
'time_base_seconds' (aka 'long') to '__darwin_suseconds_t' (aka 'int')

fTv.tv_usec = useconds;

tv_usec is of type __darwin_suseconds_t which is a typedef to __int32_t  and
that is a typedef to int

I've temporarily surrounded it with but this may not be the cleanest fix:

#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
  Timeval(time_base_seconds seconds, time_base_seconds useconds) {
    fTv.tv_sec = seconds; fTv.tv_usec = useconds;
  }
#pragma GCC diagnostic pop
 

Thanks,
Tim


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20120906/5fe34e70/attachment.html>


More information about the live-devel mailing list