]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
doc: fix compiler warning in libcurl.m4
authorEvgeny Grin (Karlson2k) <k2k@narod.ru>
Tue, 7 Mar 2023 18:37:12 +0000 (21:37 +0300)
committerDaniel Stenberg <daniel@haxx.se>
Wed, 8 Mar 2023 13:24:08 +0000 (14:24 +0100)
Current test for curl_free() may produce warnings with strict compiler
flags or even with default compiler flags with upcoming versions.
These warning could turned into errors by -Werror or similar flags.
Such warnings/errors are avoided by this patch.

Closes #10710

docs/libcurl/libcurl.m4

index 7215f44a3cc230cece6b3c898646faee3fa2761e..d02092073cbfcae8f4138f35c8cf6e6cb7b9fe99 100644 (file)
@@ -199,9 +199,10 @@ if (x) {;}
            _libcurl_save_libs=$LIBS
            LIBS="$LIBS $LIBCURL"
 
-           AC_CHECK_FUNC(curl_free,,
-              AC_DEFINE(curl_free,free,
-                [Define curl_free() as free() if our version of curl lacks curl_free.]))
+           AC_CHECK_DECL([curl_free],[],
+              [AC_DEFINE([curl_free],[free],
+                [Define curl_free() as free() if our version of curl lacks curl_free.])],
+              [[#include <curl/curl.h>]])
 
            CPPFLAGS=$_libcurl_save_cppflags
            LIBS=$_libcurl_save_libs