From unknown Thu Jun 19 14:02:55 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#10846 <10846@debbugs.gnu.org> To: bug#10846 <10846@debbugs.gnu.org> Subject: Status: warning: non-literal format string Reply-To: bug#10846 <10846@debbugs.gnu.org> Date: Thu, 19 Jun 2025 21:02:55 +0000 retitle 10846 warning: non-literal format string reassign 10846 guile submitter 10846 Bruno Haible severity 10846 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Sun Feb 19 07:54:33 2012 Received: (at submit) by debbugs.gnu.org; 19 Feb 2012 12:54:33 +0000 Received: from localhost ([127.0.0.1]:45328 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Rz6Hg-0000b3-1x for submit@debbugs.gnu.org; Sun, 19 Feb 2012 07:54:33 -0500 Received: from eggs.gnu.org ([140.186.70.92]:54609) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Rz6Hd-0000aq-4w for submit@debbugs.gnu.org; Sun, 19 Feb 2012 07:54:30 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rz6FW-0006J5-1a for submit@debbugs.gnu.org; Sun, 19 Feb 2012 07:52:18 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, T_DKIM_INVALID autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([140.186.70.17]:45748) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rz6FW-0006J1-05 for submit@debbugs.gnu.org; Sun, 19 Feb 2012 07:52:18 -0500 Received: from eggs.gnu.org ([140.186.70.92]:59449) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rz6FU-0005sQ-OU for bug-guile@gnu.org; Sun, 19 Feb 2012 07:52:17 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rz6FT-0006Il-KF for bug-guile@gnu.org; Sun, 19 Feb 2012 07:52:16 -0500 Received: from mo-p00-ob.rzone.de ([81.169.146.162]:40119) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rz6FT-0006IY-1W for bug-guile@gnu.org; Sun, 19 Feb 2012 07:52:15 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; t=1329655933; l=1708; s=domk; d=haible.de; h=Content-Type:Content-Transfer-Encoding:MIME-Version:Date:Subject:To: From:X-RZG-CLASS-ID:X-RZG-AUTH; bh=3oHaUjTw66gWzBG4a+I2zEg1yXs=; b=w1mgPDKH5pf7mBJwvL0TA8Rqvec4LMeMwSB7h69yRptdAQ9GoUOyqECx8hgtRqC1HFa 6DR8Sm/IwjTwqS7DqTkUvFOmfLZ8mlpffEab2vNto4lH4Y8Fa6CIRP2/FNcuDEOUl+3ig pSY9UpDM32tm6YRsP2QJ7IGVGoU3clKiNGE= X-RZG-AUTH: :Ln4Re0+Ic/6oZXR1YgKryK8brksyK8dozXDwHXjf9hj/zDNRbvY44zMkpA== X-RZG-CLASS-ID: mo00 Received: from linuix.haible.de (dslb-088-068-070-142.pools.arcor-ip.net [88.68.70.142]) by smtp.strato.de (cohen mo3) (RZmta 27.7 DYNA|AUTH) with ESMTPA id g03a3ao1JB1cOc ; Sun, 19 Feb 2012 13:52:00 +0100 (MET) From: Bruno Haible To: bug-guile@gnu.org Bcc: bruno@haible.de Subject: warning: non-literal format string Date: Sun, 19 Feb 2012 13:52:33 +0100 Message-ID: <16640498.OQoduWY98x@linuix> User-Agent: KMail/4.7.4 (Linux/3.1.0-1.2-desktop; KDE/4.7.4; x86_64; ; ) MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.17 X-Spam-Score: -4.2 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.2 (----) Hi, With the default settings, guile's compiler warns about a format string that is returned by the gettext function. How to reproduce: ================================= prog.scm ================================= (use-modules (ice-9 format)) (setlocale LC_ALL "") (textdomain "prog") (bindtextdomain "prog" ".") (define n (string->number (list-ref (command-line) 1))) (format #t "~A~%" (gettext "'Your command, please?', asked the waiter.")) (format #t "~@?~%" (ngettext "a piece of cake" "~D pieces of cake" n) n) (format #t "~A~%" (format #f (gettext "~A is replaced by ~A.") "FF" "EUR")) ============================================================================ $ uname -srm SunOS 5.11 i86pc $ guile --version guile (GNU Guile) 2.0.3.152-c5f6c2 ... $ guile -s prog.scm 2 ;;; note: auto-compilation is enabled, set GUILE_AUTO_COMPILE=0 ;;; or pass the --no-auto-compile argument to disable. ;;; compiling /home/bruno/gettext-0.18.2-32-static/gettext-tools/tests/prog.scm ;;; /home/bruno/gettext-0.18.2-32-static/gettext-tools/tests/prog.scm:13:18: warning: non-literal format string ;;; compiled /home/bruno/.cache/guile/ccache/2.0-LE-4-2.0/home/bruno/gettext-0.18.2-32-static/gettext-tools/tests/prog.scm.go 'Your command, please?', asked the waiter. 2 pieces of cake FF is replaced by EUR. Given that - It is normal for a program to be internationalized, - It is normal for an internationalized program to have its format strings passed through the gettext function. such situations should not produce warnings with the default settings. It's OK in my opinion to have this warning enabled through special options or settings, though. Bruno From debbugs-submit-bounces@debbugs.gnu.org Sun Feb 19 18:00:02 2012 Received: (at 10846-done) by debbugs.gnu.org; 19 Feb 2012 23:00:02 +0000 Received: from localhost ([127.0.0.1]:46275 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RzFje-0001RA-1p for submit@debbugs.gnu.org; Sun, 19 Feb 2012 18:00:02 -0500 Received: from xanadu.aquilenet.fr ([88.191.123.111]:60560) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RzFjb-0001QZ-Ic for 10846-done@debbugs.gnu.org; Sun, 19 Feb 2012 18:00:00 -0500 Received: from localhost (xanadu.aquilenet.fr [127.0.0.1]) by xanadu.aquilenet.fr (Postfix) with ESMTP id 0B9866C74; Sun, 19 Feb 2012 23:57:51 +0100 (CET) Received: from xanadu.aquilenet.fr ([127.0.0.1]) by localhost (xanadu.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id UILQ-fzTO9Fl; Sun, 19 Feb 2012 23:57:50 +0100 (CET) Received: from pluto (reverse-83.fdn.fr [80.67.176.83]) by xanadu.aquilenet.fr (Postfix) with ESMTPSA id 60A606C57; Sun, 19 Feb 2012 23:57:50 +0100 (CET) From: ludo@gnu.org (Ludovic =?iso-8859-1?Q?Court=E8s?=) To: Bruno Haible Subject: Re: bug#10846: warning: non-literal format string References: <16640498.OQoduWY98x@linuix> Date: Sun, 19 Feb 2012 23:57:49 +0100 In-Reply-To: <16640498.OQoduWY98x@linuix> (Bruno Haible's message of "Sun, 19 Feb 2012 13:52:33 +0100") Message-ID: <87aa4ewhw2.fsf@gnu.org> User-Agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.93 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -1.2 (-) X-Debbugs-Envelope-To: 10846-done Cc: 10846-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.2 (-) Hi Bruno, Bruno Haible skribis: > Given that > - It is normal for a program to be internationalized, > - It is normal for an internationalized program to have its format stri= ngs > passed through the gettext function. > such situations should not produce warnings with the default settings. Thanks, fixed here: http://git.savannah.gnu.org/cgit/guile.git/commit/?h=3Dstable-2.0&id=3Daf= c9803113de660a761f476b7957e92cc60bad19 http://git.savannah.gnu.org/cgit/guile.git/commit/?h=3Dstable-2.0&id=3D98= 385ed20abdc191a67daef8a00b1df0290a074a > It's OK in my opinion to have this warning enabled through special options > or settings, though. The =E2=80=98format=E2=80=99 warning is in =E2=80=98%auto-compilation-optio= ns=E2=80=99, but it can be turned off at the user=E2=80=99s option. Thanks, Ludo=E2=80=99. From unknown Thu Jun 19 14:02:55 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 19 Mar 2012 11:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator