httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Howard Fear <...@pooh.pageplus.com>
Subject Re: strange code in mod_include.c
Date Thu, 26 Dec 1996 21:58:22 GMT

Rob Hartill forwarded the following:

Dave Kristol wrote:
>My compiler (Sun ANSI C compiler) says:
>"mod_include.c", line 1058: warning: end-of-loop code not reached
>"mod_include.c", line 1163: warning: end-of-loop code not reached
>
>As I look at the code, it appears that the loops can both only be
>executed once.  I haven't studied the code to try to figure out what it
>is, or should be, doing, but it seems like this is a bug.  Thought
>you'd want to know.

I know, I know.  No the code's not broken.  Some year (R2.0 maybe)
I'll rewrite this whole section to be table driven.  Until then, I'm
kind of stuck with it.  Its in the code that structures the parse
tree for xssi expressions.  There's a big switch statement that
handles precedence by running a similar piece of code for each operator.
I found it easier as I added operators (Apache didn't get anything
near the initial version of this) to maintain the code in each section
as consistently as possible.  The two specific instances above handle
the highest precedence operators so their loops run only once.  Yes,
the loops aren't necessary for these specific cases, but I've found it
easier to leave the loops in to ease adding other operators.

Table driving the parsing will make this go away.  And, I've just
about convinced myself that I won't need any additional operators,
although we'll see what happens when 1.2 really hits the street.

--
Howard Fear      email1: howard_fear@pageplus.com
                 email2: howard_fear@redcape.com
                 http://www.pageplus.com/~hsf/

Mime
View raw message