FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian GCC

 
 
LinkBack Thread Tools
 
Old 08-01-2008, 12:40 PM
"Alexander E. Patrakov"
 
Default Bug#493225: gcc-4.3: Should warn about format strings similar to "%-20.20s"

Package: gcc-4.3
Version: 4.3.1-2
Severity: wishlist

Some projects like exif use statements like this for aligning the output:

fprintf (stdout, "%-20.20s", C(CN(exif_tag_get_title_in_ifd (e->tag, ifd))));
printf ("|");

and this doesn't work (i.e., the output is misaligned because bytes,
characters and cells are completely different things) in multibyte locales.
IMHO it is a good idea to educate such ignorant upstreams with a new warning
about printf format strings that specify %s and the field width (and possibly
precision).

--
Alexander E. Patrakov



--
To UNSUBSCRIBE, email to debian-gcc-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 

Thread Tools




All times are GMT. The time now is 08:52 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org