Zero padding structs is part of C90. Details here:
http://www.pixelbeat.org/programming/gcc/auto_init.html
gcc doesn't zero pad when _all_ elements are specified.
So perhaps just:
- struct timespec rts;
- struct timeval rtv;
+ struct timespec rts = {0,};
+ struct timeval rtv = {0,};
One could also move the rtv declaration
to the scope where it's used.
cheers,
Pádraig.
--