From a3a131b2a68da4562eedeb9c3284ace1fcce9966 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Sun, 5 Jan 2025 14:24:40 +0100 Subject: [PATCH] autotools: silence gcc warnings in libtool code ``` ./.libs/lt-upload-pausing.c: In function 'lt_fatal': ./.libs/lt-upload-pausing.c:593:1: warning: function might be candidate for attribute 'noreturn' [-Wsuggest-attribute=noreturn] 593 | lt_fatal (const char *file, int line, const char *message, ...) | ^~~~~~~~ ``` https://github.com/curl/curl/actions/runs/12611924141/job/35148104431?pr=15911#step:11:264 Ref: https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wsuggest-attribute_003d Closes #15915 --- m4/curl-compilers.m4 | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/m4/curl-compilers.m4 b/m4/curl-compilers.m4 index b3521f4be8..994eb9c522 100644 --- a/m4/curl-compilers.m4 +++ b/m4/curl-compilers.m4 @@ -1044,6 +1044,12 @@ AC_DEFUN([CURL_SET_COMPILER_WARNING_OPTS], [ if test "$curl_cv_native_windows" = "yes"; then tmp_CFLAGS="$tmp_CFLAGS -Wno-pedantic-ms-format" fi + case $host_os in + cygwin*) + dnl Silence warning in 'lt_fatal' libtool function + tmp_CFLAGS="$tmp_CFLAGS -Wno-suggest-attribute=noreturn" + ;; + esac fi # dnl Only gcc 4.6 or later