diff --git lib/iso9660/iso9660.c lib/iso9660/iso9660.c
index bb514d9..bf8d6b3 100644
--- lib/iso9660/iso9660.c
+++ lib/iso9660/iso9660.c
@@ -361,6 +361,7 @@ iso9660_set_dtime(const struct tm *p_tm, /*out*/ iso9660_dtime_t *p_idr_date)
   from a Unix time structure. timezone is given as an offset
   correction in minutes.
 */
+#pragma GCC diagnostic ignored "-Wformat-truncation"
 void
 iso9660_set_ltime_with_timezone(const struct tm *p_tm,
                                 int time_zone,
@@ -373,7 +374,6 @@ iso9660_set_ltime_with_timezone(const struct tm *p_tm,
 
   if (!p_tm) return;
 
-#pragma GCC diagnostic ignored "-Wformat-truncation"
   snprintf(_pvd_date, 17,
            "%4.4d%2.2d%2.2d" "%2.2d%2.2d%2.2d" "%2.2d",
            p_tm->tm_year + 1900, p_tm->tm_mon + 1, p_tm->tm_mday,
