[PATCH] Fix wide char format specifier in libio/tst-bz24153.c.

Stefan Liebler stli@linux.ibm.com
Wed Feb 6 08:26:00 GMT 2019


Hi,

on big endian systems the test fails with:
tst-bz24153.c:88: numeric comparison failure
    left: 1660944385 (0x63000001); from: ch
   right: 99 (0x63); from: L'c'
tst-bz24153.c:90: numeric comparison failure
    left: 1677721601 (0x64000001); from: ch
   right: 100 (0x64); from: L'd'
error: 2 test failures

One 'char' ("%c") is stored to the pointer 'wchar_t *':
ch = 0x00000001 | 0x63000000

This patch is using "%lc" as format specifier to read a wchar_t.

Okay to commit?

Bye,
Stefan

ChangeLog:

	* libio/tst-bz24153.c (wide): Use wide char format specifier.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 20190205_tst-bz24153.patch
Type: text/x-patch
Size: 1342 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20190206/d50ccdb6/attachment.bin>


More information about the Libc-alpha mailing list