INN snapshot failures

Julien ÉLIE julien at trigofacile.com
Sun Sep 24 20:30:41 UTC 2017


Hi Russ,

> lex.yy.c: In function 'yy_get_next_buffer':
> lex.yy.c:667:18: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
> lex.yy.c:1316:3: note: in expansion of macro 'YY_INPUT'
> cc1: all warnings being treated as errors

New flex version shipped with Stretch defines n as size_t whereas it was 
defined as int in previous version:

#define YY_INPUT(buf,result,max_size) \
     if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
         { \
         int c = '*'; \
         int n; \
         for ( n = 0; n < max_size && \
                  (c = getc( yyin )) != EOF && c != '\n'; ++n ) \

Yet, max_size is an int in both versions...


I don't know how to fix that without a quirk in INN, that is to say 
adding a cast to (size_t) for num_to_read at line 1322 during the build 
(for instance a sed command in Makefile):
         YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
                   (yy_n_chars), (size_t) num_to_read );

Yet, it may break with another versions of flex...
Maybe the best way would be to disable the sign-compare check for that 
file?  (with a sed command adding the relevant gcc pragma at the 
beginning of the file?)


FYI, I see that the issue has already been reported to upstream, and 
will be fixed in flex 2.7.0 (not released yet):
https://github.com/westes/flex/issues/97

-- 
Julien ÉLIE

« Mais, Allemand que vous êtes, un Anglais à votre place se serait
   fait tuer pour nous, et je lui aurais donné la main de ma fille. »
   (Edemond About)


More information about the inn-workers mailing list