help-flex
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

possible flex bug 2.5.27


From: Bruce Lilly
Subject: possible flex bug 2.5.27
Date: Mon, 17 Feb 2003 22:46:17 -0500
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20021130

When running splint of a project's files, it reported the
following error:

lex.mail.c:8540:11: Comparison of unsigned value involving zero:
                       num_to_read <= 0

I traced that back to the following snippet in flex.skl, ca. line 1252:

                        size_t num_to_read =
                        YY_G(yy_current_buffer)->yy_buf_size - number_to_move - 
1;

                while ( num_to_read <= 0 )


size_t is unsigned, so num_to_read can never be < 0.
The comparison probably should be:

                while ( num_to_read == 0U )

By the way, I looked to see if there was a package more recent
than 2.5.27, but there was only a snapshot, no tar package at
ftp://ftp.uncg.edu/people/wlestes/.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]