On 01/12/2012 05:04 AM, Jim Meyering wrote:
> Eric Blake wrote:
>> On 01/11/2012 04:44 PM, Paul Eggert wrote:
>>> On 01/11/12 15:24, Eric Blake wrote:
+ best.len = 0;
>>>
>>> I have some qualms about adding unnecessary initializations
>>> merely to silence GCC. It's not just that it bloats t
Eric Blake wrote:
> On 01/11/2012 04:44 PM, Paul Eggert wrote:
>> On 01/11/12 15:24, Eric Blake wrote:
>>> + best.len = 0;
>>
>> I have some qualms about adding unnecessary initializations
>> merely to silence GCC. It's not just that it bloats the
>> runtime -- it's that it makes the code more co
On 01/11/12 16:01, Eric Blake wrote:
> putting it inside #ifdef lint means you won't solve the compilation
> warning in the default case.
In the default case, GCC doesn't warn, right?
That is, it warns only if you enable some flags such as -Wall?
If so, it's OK if we ask people who set such flags
On 01/11/2012 05:01 PM, Eric Blake wrote:
> On 01/11/2012 04:44 PM, Paul Eggert wrote:
>> On 01/11/12 15:24, Eric Blake wrote:
>>> + best.len = 0;
>>
>> I have some qualms about adding unnecessary initializations
>> merely to silence GCC. It's not just that it bloats the
>> runtime -- it's that i
On 01/11/2012 04:44 PM, Paul Eggert wrote:
> On 01/11/12 15:24, Eric Blake wrote:
>> + best.len = 0;
>
> I have some qualms about adding unnecessary initializations
> merely to silence GCC. It's not just that it bloats the
> runtime -- it's that it makes the code more confusing, because
> later
On 01/11/12 15:24, Eric Blake wrote:
> + best.len = 0;
I have some qualms about adding unnecessary initializations
merely to silence GCC. It's not just that it bloats the
runtime -- it's that it makes the code more confusing, because
later readers might mistakenly assume that the initializations
gcc -O2 couldn't tell that if best.base != -1, then best.len
was necessarily initialized.
* lib/inet_ntop.c (inet_ntop6): Initialize best.base.
Reported by Daniel P. Berrange.
Signed-off-by: Eric Blake
---
ChangeLog |6 ++
lib/inet_ntop.c |1 +
2 files changed, 7 insertions(+)