From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: guix/scripts/refresh.scm:331:14: warning: non-literal format string. Date: Wed, 11 Nov 2015 22:11:22 +0100 Message-ID: <87fv0cckcl.fsf@gnu.org> References: <87611bv29w.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:37423) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zwcgq-00076E-Uj for guix-devel@gnu.org; Wed, 11 Nov 2015 16:13:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZwcgP-0003md-BV for guix-devel@gnu.org; Wed, 11 Nov 2015 16:12:24 -0500 In-Reply-To: <87611bv29w.fsf@gnu.org> (Mathieu Lirzin's message of "Mon, 09 Nov 2015 12:30:03 +0100") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Mathieu Lirzin Cc: guix-devel@gnu.org, Eric Bavier Mathieu Lirzin skribis: > Here is the snippet of the code producing this warning: > > (format (current-output-port) > (N_ (N_ "A single dependent package: ~2*~{~a~}~%" > "Building the following package would ensur= e ~d \ > dependent packages are rebuilt; ~*~{~a~^ ~}~%" > total-dependents) > "Building the following ~d packages would ensur= e ~d \ > dependent packages are rebuilt: ~{~a~^ ~}~%" > (length rebuilds)) > (length rebuilds) total-dependents rebuilds) > > I'm not sure how Gettext plural forms should be used so: > > - If the code is correct, I think we should provide a comment announcing > the warning and explaining why this is OK. > > - else, how can we fix it? I believe commit 14649b8 fixes it. It was not obvious at first sight how to untangle this, but making it two separate =E2=80=98format=E2=80=99 c= alls does the trick. Thanks, Ludo=E2=80=99.