From f8c294ade0f795d70fa65ce700081e8d118ecb2b Mon Sep 17 00:00:00 2001 From: Thomas Klausner Date: Mon, 24 Jun 2024 08:57:16 +0200 Subject: [PATCH] Extend ignoring of incompatible pointer types warning to gcc>13. Fixes #440. --- THANKS | 1 + lib/zip_source_file_win32.h | 3 +++ 2 files changed, 4 insertions(+) diff --git a/THANKS b/THANKS index 1b46ce96e..25a3fed05 100644 --- a/THANKS +++ b/THANKS @@ -145,6 +145,7 @@ Simon Talbot SpaceIm Stephen Bryant Tabata Shintaro +takase1121 Tarmo Pikaro Taylor C. Richberger TC diff --git a/lib/zip_source_file_win32.h b/lib/zip_source_file_win32.h index d86069eca..86ef2651c 100644 --- a/lib/zip_source_file_win32.h +++ b/lib/zip_source_file_win32.h @@ -76,6 +76,9 @@ int _zip_win32_error_to_errno(DWORD win32err); #ifdef __clang__ #define DONT_WARN_INCOMPATIBLE_FN_PTR_BEGIN _Pragma("GCC diagnostic push") _Pragma("GCC diagnostic ignored \"-Wincompatible-function-pointer-types\"") #define DONT_WARN_INCOMPATIBLE_FN_PTR_END _Pragma("GCC diagnostic pop") +#elif defined(__GNUC__) && __GNUC__ > 13 +#define DONT_WARN_INCOMPATIBLE_FN_PTR_BEGIN _Pragma("GCC diagnostic push") _Pragma("GCC diagnostic ignored \"-Wincompatible-pointer-types\"") +#define DONT_WARN_INCOMPATIBLE_FN_PTR_END _Pragma("GCC diagnostic pop") #else #define DONT_WARN_INCOMPATIBLE_FN_PTR_BEGIN #define DONT_WARN_INCOMPATIBLE_FN_PTR_END