On 11/02/2009 08:17 PM, Eric Blake wrote:
>Even better to post a
> GCC patch to avoid emitting this warning.
I have no idea where to patch that, but I guess I could go ahead and submit the
bug report.
I'd say the real bug is that it doesn't emit the warning for a char *const.
Paolo
The compiler warning is bogus. Your patch pessimizes the code; IIRC it
can cause runtime-initialization of the pointer.
Load-time relocation, to be precise.
Paolo
* Eric Blake wrote on Mon, Nov 02, 2009 at 08:17:36PM CET:
> Ralf Wildenhues gmx.de> writes:
>
> > The compiler warning is bogus. Your patch pessimizes the code; IIRC it
> > can cause runtime-initialization of the pointer.
> >
> > OK to commit a patch to change this to strlen.
>
> Like so?
Ye
Ralf Wildenhues gmx.de> writes:
> The compiler warning is bogus. Your patch pessimizes the code; IIRC it
> can cause runtime-initialization of the pointer.
>
> OK to commit a patch to change this to strlen.
Like so? (apologies in advance: gmane will probably botch the patch due to long
lines)
Hi Eric,
* Eric Blake wrote on Mon, Nov 02, 2009 at 08:00:43PM CET:
> I'm seeing this when compiling with -Wall:
>
> | libltdl/ltdl.c: In function ‘try_dlopen’:
> | libltdl/ltdl.c:1267: error: the address of ‘libext’ will always evaluate
> as ‘true’
>
> The problem is that LT_STRLEN is checking
I'm seeing this when compiling with -Wall:
| libltdl/ltdl.c: In function ‘try_dlopen’:
| libltdl/ltdl.c:1267: error: the address of ‘libext’ will always evaluate
as ‘true’
The problem is that LT_STRLEN is checking for null pointers, but the address of
an array can never be null. But using a co
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I. -I. -DLTDLOPEN=libltdlc
"-DLT_CONFIG_H=" -DLTDL -I. -I. -Ilibltdl -I./libltdl
- -I./libltdl -O2 -Wall -MT libltdlc_la-ltdl.lo -MD -MP -MF
.deps/libltdlc_la-ltdl.Tpo -c ltdl.c -fPIC -DPIC -o .libs/libltdlc