From: Viktor Szakats Date: Sun, 5 Jan 2025 13:24:40 +0000 (+0100) Subject: autotools: silence gcc warnings in libtool code X-Git-Tag: curl-8_12_0~198 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a3a131b2a68da4562eedeb9c3284ace1fcce9966;p=thirdparty%2Fcurl.git 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 --- 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