Martin Gansser wrote:
+ timespec ts = {0};
The compiler will warn about the missing initializers with this idiom.
(struct timespec has more than one member.) Write this instead:
timespec ts = {};
(If you omit the initializer list within the braces entirely, as I have done
above, GCC will know that you want to initialize the struct to all zeros and
not complain about the missing zeros. Just make sure you keep the = {} part,
otherwise the struct will not be initialized at all.)
Kevin Kofler