]> granicus.if.org Git - mutt/commitdiff
Remove uninitialized warning for mutt_get_stat_timespec().
authorKevin McCarthy <kevin@8t8.us>
Fri, 22 Jun 2018 03:42:55 +0000 (20:42 -0700)
committerKevin McCarthy <kevin@8t8.us>
Fri, 22 Jun 2018 03:42:55 +0000 (20:42 -0700)
The switch covers all the types, but in some cases the compiler still
complains.  Explicitly set tv_sec = 0 to silence the warning.

muttlib.c

index 6835fe4a5f8ffeeaeaa3369d7ae2b88fc2097aea..2b48f3b84f4fba0a036df6009fde10ba2bc0f543 100644 (file)
--- a/muttlib.c
+++ b/muttlib.c
@@ -1972,6 +1972,7 @@ int mutt_timespec_compare (struct timespec *a, struct timespec *b)
 
 void mutt_get_stat_timespec (struct timespec *dest, struct stat *sb, mutt_stat_type type)
 {
+  dest->tv_sec = 0;
   dest->tv_nsec = 0;
 
   switch (type)