]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
src/tool_filetime: disable -Wformat on mingw for this file
authorDaniel Stenberg <daniel@haxx.se>
Thu, 15 Oct 2020 08:14:10 +0000 (10:14 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 15 Oct 2020 09:00:43 +0000 (11:00 +0200)
With gcc 10 on mingw we otherwise get this warning:

 error: ISO C does not support the 'I' printf flag [-Werror=format=]

Fixes #6079
Closes #6082

src/tool_filetime.c

index 1ffc981feeab6c860571f68d0036f31ec0d06ec2..bc0132b0c0c2270f735408c1f8ebb7cc6b478094 100644 (file)
 #  include <sys/utime.h>
 #endif
 
+#if defined(__GNUC__) && defined(__MINGW32__)
+/* GCC 10 on mingw has issues with this, disable */
+#pragma GCC diagnostic ignored "-Wformat"
+#endif
+
 curl_off_t getfiletime(const char *filename, FILE *error_stream)
 {
   curl_off_t result = -1;