From 93545d5cf21225cac4fc9e2188579c213ae93ac9 Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Wed, 23 Apr 2008 00:33:58 +0000 Subject: [PATCH] Silence an g++ -Wextra warning. [SVN r44728] --- include/boost/detail/yield_k.hpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/include/boost/detail/yield_k.hpp b/include/boost/detail/yield_k.hpp index d856d57..0d964a7 100644 --- a/include/boost/detail/yield_k.hpp +++ b/include/boost/detail/yield_k.hpp @@ -111,7 +111,11 @@ inline void yield( unsigned k ) } else { - struct timespec rqtp = { 0 }; + // g++ -Wextra warns on {} or {0} + struct timespec rqtp = { 0, 0 }; + + // POSIX says that timespec has tv_sec and tv_nsec + // But it doesn't guarantee order or placement rqtp.tv_sec = 0; rqtp.tv_nsec = 1000;