]> granicus.if.org Git - neomutt/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)
committerRichard Russon <rich@flatcap.org>
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 466cde466008b4655935234443f013808af66430..595f832d71bc12c7707bdfd8d798ae323022ea20 100644 (file)
--- a/muttlib.c
+++ b/muttlib.c
@@ -1464,6 +1464,7 @@ int mutt_timespec_compare(struct timespec *a, struct timespec *b)
  */
 void mutt_get_stat_timespec(struct timespec *dest, struct stat *sb, enum MuttStatType type)
 {
+  dest->tv_sec = 0;
   dest->tv_nsec = 0;
 
   switch (type)