From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 106636 invoked by alias); 7 Jun 2017 14:41:44 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 106623 invoked by uid 89); 7 Jun 2017 14:41:43 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW autolearn=no version=3.3.2 spammy= X-HELO: mx0a-001b2d01.pphosted.com Subject: Re: [PATCH] Dynamic growable arrays for internal use To: libc-alpha@sourceware.org References: <37f01ed4-1443-8585-42cb-1b7759416ee7@linux.vnet.ibm.com> <5308ddfb-a125-e4f6-8615-3148e350bdd6@redhat.com> From: Stefan Liebler Date: Wed, 07 Jun 2017 14:41:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.0 MIME-Version: 1.0 In-Reply-To: <5308ddfb-a125-e4f6-8615-3148e350bdd6@redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 x-cbid: 17060714-0016-0000-0000-000004B71B3E X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17060714-0017-0000-0000-000027E6F9F8 Message-Id: <739e4105-e502-1e4e-7494-d7599ddb8b51@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-06-07_09:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=1 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1703280000 definitions=main-1706070270 X-SW-Source: 2017-06/txt/msg00248.txt.bz2 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 /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. Thanks. Stefan