|
Boost : |
From: Juergen Hunold (juergen.hunold_at_[hidden])
Date: 2008-04-21 16:11:55
Hi Peter !
On Monday 21 April 2008, Peter Dimov wrote:
> POSIX says that struct timespec has at least the members tv_sec and
> tv_nsec, but it doesn't guarantee their order or placement.
oops, I just looked at /usr/include/time.h :-((
> Does
>
> struct timespec rqtp = {};
>
> still emit the warnings?
Quick test shows:
$BOOST_ROOT/boost/boost/detail/yield_k.hpp: In function 'void
boost::detail::yield(unsigned int)':
$BOOST_ROOT/boost/boost/detail/yield_k.hpp:114: warning: missing
initializer for member 'timespec::tv_sec'
$BOOST_ROOT//boost/boost/detail/yield_k.hpp:114: warning: missing
initializer for member 'timespec::tv_nsec'
Actually this gets worse :-((
Omitting the initialiser list works:
Index: yield_k.hpp
===================================================================
--- yield_k.hpp (revision 44703)
+++ yield_k.hpp (working copy)
@@ -111,7 +111,7 @@
}
else
{
- struct timespec rqtp = { 0 };
+ struct timespec rqtp;
rqtp.tv_sec = 0;
rqtp.tv_nsec = 1000;
Thanks for the quick response !
Yours,
Jürgen
-- * Dipl.-Math. Jürgen Hunold ! Ingenieurgesellschaft für * voice: ++49 511 262926 57 ! Verkehrs- und Eisenbahnwesen mbH * fax : ++49 511 262926 99 ! Lister Straße 15 * juergen.hunold_at_[hidden] ! www.ivembh.de * * Geschäftsführer: ! Sitz des Unternehmens: Hannover * Prof. Dr.-Ing. Thomas Siefer ! Amtsgericht Hannover, HRB 56965 * PD Dr.-Ing. Alfons Radtke !
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk