From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29053 invoked by alias); 27 Nov 2017 16:26:11 -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 29041 invoked by uid 89); 27 Nov 2017 16:26:11 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=BAYES_00,KB_WAM_FROM_NAME_SINGLEWORD,RCVD_IN_DNSWL_NONE autolearn=no version=3.3.2 spammy=Hx-languages-length:1291 X-HELO: homiemail-a52.g.dreamhost.com Subject: Re: [PATCH] add attribute nonstring From: Siddhesh Poyarekar To: Martin Sebor , GNU C Library References: <30e8d254-6dd0-4d0a-bdee-3af212c02a49@gotplt.org> <18efaf31-b386-3aa7-480f-640d292a2957@gmail.com> <57b7e521-1a28-7362-55e6-e64ee1ef8eba@gotplt.org> Message-ID: <484cc7ea-f78a-8c80-08a9-1071fa5b447a@gotplt.org> Date: Mon, 27 Nov 2017 16:26:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <57b7e521-1a28-7362-55e6-e64ee1ef8eba@gotplt.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-SW-Source: 2017-11/txt/msg00929.txt.bz2 On Monday 27 November 2017 09:54 PM, Siddhesh Poyarekar wrote: > On Monday 27 November 2017 09:34 PM, Martin Sebor wrote: >> I didn't see any warnings in my x86_64-linux build but there could >> be others on targets I don't test.=C2=A0 The only problem I do know of >> (bug 22447) was fixed last Wednesday. >> >> It would be helpful if you could share some details about the code >> that triggers the warning, what target, etc. >=20 > I saw this during an aarch64 cross-build on an x86_64 host: >=20 > In file included from ../sysdeps/unix/sysv/linux/getlogin_r.c:25: > ../sysdeps/unix/getlogin_r.c: In function =E2=80=98getlogin_r_fd0=E2=80= =99: > ../sysdeps/unix/getlogin_r.c:83:23: error: =E2=80=98strlen=E2=80=99 argum= ent 1 declared > attribute =E2=80=98nonstring=E2=80=99 [-Werror=3Dstringop-overflow=3D] > size_t needed =3D strlen (ut->ut_user) + 1; > ^~~~~~~~~~~~~~~~~~~~ > In file included from ../login/utmp.h:29, > from ../include/utmp.h:2, > from ../sysdeps/unix/getlogin_r.c:26, > from ../sysdeps/unix/sysv/linux/getlogin_r.c:25: > ../sysdeps/gnu/bits/utmp.h:65:8: note: argument =E2=80=98ut_user=E2=80=99= declared here > char ut_user[UT_NAMESIZE] > ^~~~~~~ > cc1: all warnings being treated as errors Ugh, sorry, that is in fact the fix. I just noticed that I had not synced to the HEAD. Thanks, Siddhesh