Skip to content
  • Fred Wright's avatar
    Fix some timespec initializer warnings · bb663654
    Fred Wright authored
    Some compilers don't seem to recognize that clock_gettime() storing
    into a struct timespec counts as initializing it, and produce "may be
    used uninitialized" warnings.  Adding initializers to the structs gets
    rid of the warnings, without adding enough overhead to worry about.
    
    TESTED:
    Now builds without warnings and passes tests, with 28 compilers
    from GCC 4.2 and Clang 3.3 to GCC 13 and Clang 17.
    bb663654