libtool-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Fix Wstrict-prototypes warnings


From: Peter Kokot
Subject: Re: [PATCH] Fix Wstrict-prototypes warnings
Date: Sun, 21 Apr 2024 20:19:02 +0200

On Tue, 16 Apr 2024 at 19:56, Ileana Dumitrescu
<ileanadumitrescu95@gmail.com> wrote:
>
> Thank you for the patch. Diagnosing the test errors is not so easy
> without more information. Could you tell me which tests failed for you,
> and which ones you fixed with the addition of this patch? Also, which
> libtool and compiler version you are using?

Consider creating a minimalistic configure.ac:

AC_PREREQ([2.71])
AC_INIT([ExampleProject], [1.0.0])
AC_PROG_CC
AC_MSG_NOTICE([Configuring Libtool])
LT_INIT
AC_OUTPUT

Then run "autoreconf -i" to create a configure script.

And then "./configure CFLAGS=-Werror=strict-prototypes"

In the config.log file there will be error similar to this:
conftest.c:10:5: error: function declaration isn't a prototype
[-Werror=strict-prototypes]
10 | int main(){nm_test_var='a';nm_test_func();return(0);}
| ^~~~
cc1: some warnings being treated as errors

Some errors are related to Autoconf, which has fixed most of these in
2.72 already. And this patch (hopefully) fixes most if not all those
related to Libtool.

Libtool version: 2.4.7
Compiler: GCC 13.2

Issue is that some compilers might enable strict-prototypes by default
in future versions.

-- 
Peter Kokot



reply via email to

[Prev in Thread] Current Thread [Next in Thread]