This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: 2.1.95 result - II - make check (failed, patch attached)
- To: Matthew Clarke <Matthew_Clarke at mindlink dot bc dot ca>
- Subject: Re: 2.1.95 result - II - make check (failed, patch attached)
- From: "Joseph S. Myers" <jsm28 at cam dot ac dot uk>
- Date: Tue, 10 Oct 2000 10:37:22 +0100 (BST)
- cc: libc-alpha at sourceware dot cygnus dot com
On Tue, 10 Oct 2000, Matthew Clarke wrote:
> I also note in passing the following compiler warnings in tst-swprintf.c
> in stdio-common (copy'n'pasted), in case anyone's interested:
>
> tst-swprintf.c:45: warning: long int format, different type arg (arg 3)
> tst-swprintf.c:45: warning: long int format, different type arg (arg 3)
Indeed, input[] can't be both a wide and a multibyte string. %s (both for
narrow and wide functions) expects a multibyte string; %ls (both for
narrow and wide functions) expects a wide string. If input[] is
multibyte, being passed to %s formats for swprintf, then it shouldn't be
passed to %ls for printf. If it's wide, it should be passed to %ls in
both cases (and should be of the right type, array of wchar_t). At
present the swprintf gets %s formats for input[], and the printf gets %ls
(twice for each CHECK invocation).
--
Joseph S. Myers
jsm28@cam.ac.uk