[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: HEAD: inclusion order wrong for input.c
From: |
Ralf Wildenhues |
Subject: |
Re: HEAD: inclusion order wrong for input.c |
Date: |
Mon, 2 Apr 2007 23:49:18 +0200 |
User-agent: |
Mutt/1.5.13 (2006-08-11) |
* Gary V. Vaughan wrote on Mon, Apr 02, 2007 at 08:28:56PM CEST:
> On 2 Apr 2007, at 18:45, Ralf Wildenhues wrote:
> >* Gary V. Vaughan wrote on Mon, Apr 02, 2007 at 02:32:45PM CEST:
> >> Thanks for the report. Although I don't get this warning, I have
> >>cleaned up the remaining warnings that I did see on OS X.
> >
> >Thanks, looking better now. I do get these warnings now, with -Wall:
> >
> >../m4/m4/macro.c: In function 'expand_macro':
> >../m4/m4/macro.c:279: warning: format '%d' expects type 'int', but
> >argument 5 has type 'size_t'
>
> This one is waiting for %z support from gnulib (maybe when snprintfv is
> fully merged).
Ah, ok, I was merely reporting because it sounded like you assumed there
were no more warnings at all.
> >../m4/m4/macro.c: In function 'process_macro':
> >../m4/m4/macro.c:425: warning: array subscript has type 'char'
> >../m4/m4/macro.c:478: warning: array subscript has type 'char'
>
> Thats because we're using a string pointer dereference to index a 256
> element array. I can't think of a pleasant way to fix that... ideas?
Cast the subscript to unsigned char before using it as index.
Otherwise, on a system where char is signed, and its high bit is set,
and you haven't adjusted the array range to allow for negative values,
fun will ensue.
Cheers,
Ralf
- HEAD: inclusion order wrong for input.c, Ralf Wildenhues, 2007/04/02
- Re: HEAD: inclusion order wrong for input.c, Eric Blake, 2007/04/03
- Re: HEAD: inclusion order wrong for input.c, Ralf Wildenhues, 2007/04/03
- Re: HEAD: inclusion order wrong for input.c, Eric Blake, 2007/04/03
- Re: HEAD: inclusion order wrong for input.c, Ralf Wildenhues, 2007/04/06
- Re: HEAD: inclusion order wrong for input.c, Eric Blake, 2007/04/10
- Re: HEAD: inclusion order wrong for input.c, Ralf Wildenhues, 2007/04/10
- stdin seekable failure [was: HEAD: inclusion order wrong for input.c], Eric Blake, 2007/04/11