Re: [Flex-devel] [Flex-help] fix compiler warning
flex is a tool for generating scanners
Brought to you by:
wlestes
From: Aaron S. <aa...@se...> - 2007-12-10 00:30:40
|
On Sun, 2007-12-09 at 07:16 -0500, Bob Rossi wrote: > On Sat, Dec 08, 2007 at 11:42:58PM -0800, Aaron Stone wrote: > > Yikes, thanks for repeatedly pinging about this, turns out I had somehow > > lost my subscription to the flex-devel mailing list. > > > > The answer is that yes, we're definitely taking all issues seriously! > > You know, I must have been in a bad mood when I wrote that. Sorry, and > thanks! No worries :-) > > About your patch, size_t is always unsigned, but it looks like the > > variable in question sometimes goes negative, and is cast to size_t only > > as needed. > > OK, I see that now. So, I have a few options that I can think of, > > 1) at this point, > /* Read in more data. */ > YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), > YY_G(yy_n_chars), num_to_read ); > > I can cast num_to_read to size_t like this: > > YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), > YY_G(yy_n_chars), (size_t)num_to_read ); This exact fix is in CVS already, as it turns out. Aaron |