This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Dynamic growable arrays for internal use
- From: Florian Weimer <fweimer at redhat dot com>
- To: Stefan Liebler <stli at linux dot vnet dot ibm dot com>, libc-alpha at sourceware dot org
- Date: Wed, 7 Jun 2017 20:56:30 +0200
- Subject: Re: [PATCH] Dynamic growable arrays for internal use
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx09.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx09.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=fweimer at redhat dot com
- Dkim-filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 862B5DC909
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 862B5DC909
- References: <edae68d6-998b-58a6-a8df-82703341da23@redhat.com> <ce479249-6362-6a58-ec9b-d6227ef99db9@redhat.com> <eb0d4e4f-1294-5b32-e9e8-004edebca698@redhat.com> <e8ac9c11-212d-dab1-4ada-d5feeae06531@redhat.com> <37f01ed4-1443-8585-42cb-1b7759416ee7@linux.vnet.ibm.com> <5308ddfb-a125-e4f6-8615-3148e350bdd6@redhat.com> <739e4105-e502-1e4e-7494-d7599ddb8b51@linux.vnet.ibm.com>
On 06/07/2017 04:41 PM, Stefan Liebler wrote:
> On 06/07/2017 11:40 AM, Florian Weimer wrote:
>> On 06/06/2017 05:30 PM, Stefan Liebler wrote:
>>> Hi Florian,
>>>
>>> I get the following warning / werror with gcc 4.8.5 on s390x:
>>> gcc tst-dynarray.c -O3 -c ... -o <build>/malloc/tst-dynarray.o
>>> In file included from tst-dynarray.c:50:0:
>>> tst-dynarray.c: In function ‘do_test’:
>>> ../support/check.h:51:8: error: ‘result.length’ may be used
>>> uninitialized in this function [-Werror=maybe-uninitialized]
>>> if (expr) \
>>> ^
>>> tst-dynarray.c:377:23: note: ‘result.length’ was declared here
>>> struct long_array result;
>>> ^
>>> In file included from tst-dynarray.c:50:0:
>>> ../support/check.h:51:8: error: ‘result.array’ may be used uninitialized
>>> in this function [-Werror=maybe-uninitialized]
>>> if (expr) \
>>> ^
>>> tst-dynarray.c:377:23: note: ‘result.array’ was declared here
>>> struct long_array result;
>>> ^
>>> cc1: all warnings being treated as errors
>>>
>>>
>>> Have you seen those warnings on other architectures, too?
>>
>> I could reproduce it with -O3 on s390x. I have not tried it with other
>> architectures, but it is a generic problem with TEST_VERIFY_EXIT which
>> is not really related to the dynarray code. I propose the attached
>> patch to fix it.
>>
>> Thanks,
>> Florian
>>
>
> This solves the warning with gcc 4.8.5 on s390x.
Okay, I'll check it in tomorrow unless there are objections/further
comments.
Thanks,
Florian