[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-wget] Code installation issues
From: |
Tim Rühsen |
Subject: |
Re: [Bug-wget] Code installation issues |
Date: |
Tue, 11 Jul 2017 21:36:29 +0200 |
User-agent: |
KMail/5.2.3 (Linux/4.11.0-1-amd64; KDE/5.28.0; x86_64; ; ) |
On Dienstag, 11. Juli 2017 20:20:08 CEST Tim Rühsen wrote:
> On Dienstag, 11. Juli 2017 16:37:31 CEST Michael wrote:
> > Hello there,
> >
> > I have installed the wget2 code on a Raspberry pi machine.
> >
> > The make check report error on the unit tests: "
> > test_buffer_printf: Failed with format ('%hhd','-1'): '255' != '-1'
> > test_buffer_printf: Failed with format ('%hhd','-10'): '246' != '-10'
> > test_buffer_printf: Failed with format ('%hhd','-1'): '255' != '-1'
> > test_buffer_printf: Failed with format ('%hhi','-1'): '255' != '-1'
> > test_buffer_printf: Failed with format ('%hhi','-10'): '246' != '-10'
> > test_buffer_printf: Failed with format ('%hhi','-1'): '255' != '-1'
> > .
> > .
> > .
> > test_buffer_printf: Failed with format ('%-011.11hhi','-1'): '00000000255'
> > != '-00000000001'
> > test_buffer_printf: Failed with format ('%-011.11hhi','-10'):
> > '00000000246'
> > != '-00000000010'
> > test_buffer_printf: Failed with format ('%-011.11hhi','-1'): '00000000255'
> > != '-00000000001'
> > ERROR: 4056 out of 195769 basic tests failed
> > This may completely break Wget functionality !!!"
>
> Could you change L441 in libwget/buffer_printf.c like:
> - arg = (char) va_arg(args, int);
> + arg = (signed char) va_arg(args, int);
>
> Maybe your 'char' type is signed. This is not fixed by the C standard and
> could explain the above output.
Fixed now. Found the gcc flag -funsigned-char. Built with that, I could
reproduce the above output. And my proposed patch fixes it.
Thanks for reporting, Michael !
Regards, Tim
signature.asc
Description: This is a digitally signed message part.