GNU bug report logs - #11472
Message src/fmt.c:285 marked as c-formatted string erroneously

Previous Next

Package: coreutils;

Reported by: Petr Pisar <petr.pisar <at> atlas.cz>

Date: Mon, 14 May 2012 21:54:02 UTC

Severity: normal

Merged with 11470, 11471, 11483, 11494, 11740

Done: Jim Meyering <jim <at> meyering.net>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 11472 in the body.
You can then email your comments to 11472 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-coreutils <at> gnu.org:
bug#11472; Package coreutils. (Mon, 14 May 2012 21:54:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Petr Pisar <petr.pisar <at> atlas.cz>:
New bug report received and forwarded. Copy sent to bug-coreutils <at> gnu.org. (Mon, 14 May 2012 21:54:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Petr Pisar <petr.pisar <at> atlas.cz>
To: bug-coreutils <at> gnu.org
Subject: Message src/fmt.c:285 marked as c-formatted string erroneously
Date: Mon, 14 May 2012 21:27:42 +0200
[Message part 1 (text/plain, inline)]
Hello,

coreutils-8.17 contains this message:

#: src/fmt.c:285
#, c-format
msgid ""
"  -t, --tagged-paragraph    indentation of first line different from
second\n"
"  -u, --uniform-spacing     one space between words, two after sentences\n"
"  -w, --width=WIDTH         maximum line width (default of 75 columns)\n"
"  -g, --goal=WIDTH          goal width (default of 93% of width)\n"

The message is detected by xgettext as C formatted string because of the
percentage character.

The problem is such string does not pass through msgfmt tool while compiling
the catalog because the '% ' is not a valid printf sequence.

Solution is to suppress the auto-detection by adding /*xgettext:no-c-format*/
before the fputs() line in the source code.

-- Petr
[Message part 2 (application/pgp-signature, inline)]

Information forwarded to bug-coreutils <at> gnu.org:
bug#11472; Package coreutils. (Mon, 14 May 2012 22:04:02 GMT) Full text and rfc822 format available.

Message #8 received at 11472 <at> debbugs.gnu.org (full text, mbox):

From: Eric Blake <eblake <at> redhat.com>
To: 11472 <at> debbugs.gnu.org
Subject: Re: bug#11472: Message src/fmt.c:285 marked as c-formatted string
	erroneously
Date: Mon, 14 May 2012 16:03:08 -0600
[Message part 1 (text/plain, inline)]
merge 11470 11472
thanks

On 05/14/2012 01:27 PM, Petr Pisar wrote:
> The problem is such string does not pass through msgfmt tool while compiling
> the catalog because the '% ' is not a valid printf sequence.
> 
> Solution is to suppress the auto-detection by adding /*xgettext:no-c-format*/
> before the fputs() line in the source code.

Thanks.  You're the third person to report this today, but the first to
provide a potential patch.  Are you comfortable submitting that fix in
'git format-patch' form with a proper commit message?  If not, we will
probably do it on your behalf in the next 24 hours or so.

-- 
Eric Blake   eblake <at> redhat.com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

[signature.asc (application/pgp-signature, attachment)]

Merged 11470 11471 11472. Request was from Eric Blake <eblake <at> redhat.com> to control <at> debbugs.gnu.org. (Mon, 14 May 2012 22:04:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-coreutils <at> gnu.org:
bug#11472; Package coreutils. (Mon, 14 May 2012 22:43:01 GMT) Full text and rfc822 format available.

Message #13 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Andreas Schwab <schwab <at> linux-m68k.org>
To: bug-coreutils <at> gnu.org
Subject: Re: bug#11472: Message src/fmt.c:285 marked as c-formatted string
	erroneously
Date: Tue, 15 May 2012 00:41:25 +0200
Petr Pisar <petr.pisar <at> atlas.cz> writes:

> The problem is such string does not pass through msgfmt tool while compiling
> the catalog because the '% ' is not a valid printf sequence.

Actually, it is.  The format is 'o' with a space flag.

Andreas.

-- 
Andreas Schwab, schwab <at> linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."




Merged 11470 11471 11472 11483. Request was from Eric Blake <eblake <at> redhat.com> to control <at> debbugs.gnu.org. (Wed, 16 May 2012 04:18:03 GMT) Full text and rfc822 format available.

Forcibly Merged 11470 11471 11472 11483 11494. Request was from Eric Blake <eblake <at> redhat.com> to control <at> debbugs.gnu.org. (Wed, 16 May 2012 23:11:03 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 15 Jun 2012 11:24:02 GMT) Full text and rfc822 format available.

bug unarchived. Request was from Eric Blake <eblake <at> redhat.com> to control <at> debbugs.gnu.org. (Tue, 19 Jun 2012 14:55:02 GMT) Full text and rfc822 format available.

Forcibly Merged 11470 11471 11472 11483 11494 11740. Request was from Eric Blake <eblake <at> redhat.com> to control <at> debbugs.gnu.org. (Tue, 19 Jun 2012 14:55:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 18 Jul 2012 11:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 12 years and 343 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.