[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: avoid gcc compiler warning
From: |
Eric Blake |
Subject: |
Re: avoid gcc compiler warning |
Date: |
Mon, 29 Sep 2008 05:58:41 -0600 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.17) Gecko/20080914 Thunderbird/2.0.0.17 Mnenhy/0.7.5.666 |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
According to Ralf Wildenhues on 9/26/2008 10:03 AM:
>>
>> cc1: warnings being treated as errors
>> ../ltdl/loaders/loadlibrary.c: In function 'vm_open':
>> ../ltdl/loaders/loadlibrary.c:159: error: the address of 'wpath' will always
>> evaluate as 'true'
>>
>> Applying this trivial patch (wchar was declared as an array):
>
> This patch is not really defensive programming, right?
> (The declaration is a screenful away, and we've had unwary
> copying of code from one function to another before.)
Suggestions on how to approach this, then? Maybe declare wpath with
alloca, so that it is a pointer rather than an array (MAX_PATH is 260, so
it is safe to stack allocate whether directly or via alloca)?
- --
Don't work too hard, make some time for fun as well!
Eric Blake address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkjgwvEACgkQ84KuGfSFAYC00QCfd6TLAmwL+1wmnGTaRuYMHrf3
7soAniGFMTKallS7q8R53MyP+xFATMtn
=M1U7
-----END PGP SIGNATURE-----