From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Fixing some warnings in emacs-26 Date: Sat, 08 Jun 2019 11:43:08 +0300 Message-ID: <83y32co4bn.fsf@gnu.org> References: <838sucpoiq.fsf@gnu.org> Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="24248"; mail-complaints-to="usenet@blaine.gmane.org" Cc: emacs-devel@gnu.org To: Juanma Barranquero Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jun 08 10:43:24 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hZWwe-0006BR-91 for ged-emacs-devel@m.gmane.org; Sat, 08 Jun 2019 10:43:24 +0200 Original-Received: from localhost ([::1]:56288 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hZWwc-0007zg-Ky for ged-emacs-devel@m.gmane.org; Sat, 08 Jun 2019 04:43:22 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36887) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hZWwY-0007zN-1p for emacs-devel@gnu.org; Sat, 08 Jun 2019 04:43:18 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:38769) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hZWwX-0006fI-5Y; Sat, 08 Jun 2019 04:43:17 -0400 Original-Received: from [176.228.60.248] (port=3023 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hZWwV-0005UQ-Pg; Sat, 08 Jun 2019 04:43:16 -0400 In-reply-to: (message from Juanma Barranquero on Sat, 8 Jun 2019 09:07:43 +0200) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:237328 Archived-At: > From: Juanma Barranquero > Date: Sat, 8 Jun 2019 09:07:43 +0200 > Cc: Emacs developers > > > Instead of the arbitrary value of 20, I'd prefer using sizeof for the > > actual text (which should probably be assigned to a variable, to avoid > > mentioning the same text twice). > > Done. > > Though I wanted to avoid adding complexity for a string message that's > unlikely to change. Also, addpm.c already contains a few instances of > hardcoded constants: > > /* Ensure there is enough room for "...\GNU Emacs\Emacs.lnk". */ > if (strlen (start_folder) < (MAX_PATH - 20)) > > and > > char add_item[MAX_PATH*2 + 100]; > > etc. Feel free to change them as well, although addpm is deprecated, so I wonder whether we should bother cleaning up purely stylistic issues in it. Thanks.