This is the mail archive of the
mailing list for the glibc project.
Re: [PATCH] error, warn, warnx: Use __fxprintf for wide printing [BZ #23519]
On Tue, 14 Aug 2018, Florian Weimer wrote:
>On 08/14/2018 03:22 PM, Gabriel F. T. Gomes wrote:
>> Is it true that you can remove the call to 'convert_and_print' because
>> __fxprintf and __vfxprintf already check the wideness of the output and
>> convert (indirectly via locked_vfxprintf)?
>Correct. I failed to convert an fputs_unlocked call.
>I'm also adding a test in the attached patch.
>+ one_test ("no errno", -1,
>+ L"tst-warn-wide: no errno\n");
>+ one_test ("no errno", -2,
>+ L"tst-warn-wide: no errno with padding " PADDING "\n");
>+ one_test ("with errno", EAGAIN,
>+ L"tst-warn-wide: with errno: Resource temporarily unavailable\n");
>+ one_test ("with errno", E2BIG,
>+ L"tst-warn-wide: with errno with padding " PADDING
>+ ": Argument list too long\n");
'git am' is complaining about the indentation in this block. Other than
that, this version (with the test case and the removal of the call to
fputs_unlocked) looks good to me, too.