gcc 12.2.0 on MinGW produces multiple warnings similar to the one below:
  In function 'iso9660_set_dtime',
      inlined from 'iso9660_dir_add_entry_su' at iso9660.c:782:3:
  iso9660.c:353:44: warning: 'temp_tm.tm_isdst' may be used uninitialized 
[-Wmaybe-uninitialized]
    353 |     time_zone = (p_tm->tm_isdst > 0) ? -60 : 0;
        |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
This patch initializes the temp_tm structure to silence them.
---
 lib/iso9660/iso9660.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/iso9660/iso9660.c b/lib/iso9660/iso9660.c
index ae4edda3..06e7554e 100644
--- a/lib/iso9660/iso9660.c
+++ b/lib/iso9660/iso9660.c
@@ -721,7 +721,7 @@ iso9660_dir_add_entry_su(void *dir,
   unsigned int offset = 0;
   uint32_t dsize = from_733(idr->size);
   int length, su_offset;
-  struct tm temp_tm;
+  struct tm temp_tm = { 0 };
   cdio_assert (sizeof(iso9660_dir_t) == 33);
 
   if (!dsize && !idr->length)
-- 
2.39.1.windows.1


Reply via email to