From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 125273 invoked by alias); 23 Mar 2018 01:17:31 -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 124903 invoked by uid 89); 23 Mar 2018 01:17:30 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS,URIBL_RED autolearn=ham version=3.3.2 spammy= X-HELO: relay1.mentorg.com Date: Fri, 23 Mar 2018 01:17:00 -0000 From: Joseph Myers To: Khem Raj CC: Subject: Re: [PATCH] Replace strncpy with memccpy to fix -Wstringop-truncation. In-Reply-To: <20180323010729.41457-1-raj.khem@gmail.com> Message-ID: References: <20180323010729.41457-1-raj.khem@gmail.com> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" X-ClientProxiedBy: svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) To svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) X-SW-Source: 2018-03/txt/msg00532.txt.bz2 On Thu, 22 Mar 2018, Khem Raj wrote: > * nis/nss_nisplus/nisplus-parser.c: Replace strncpy with memcpy to > avoid -Wstringop-truncation. Could you give more details of (a) in what circumstances (architecture, compiler, etc.) you get this warning and (b) why the truncation is correct? Whatever build failure you got hasn't shown up with build-many-glibcs.py. Maybe that should include a configuration with --enable-obsolete-rpc --enable-obsolete-nsl to make sure that it tests building those bits of code that are disabled by default? -- Joseph S. Myers joseph@codesourcery.com