Skip to content

Commit

Permalink
bug25946: Tighten up unreachable-code warnings
Browse files Browse the repository at this point in the history
Take variable out of play which was set but not used on windows.

Change-Id: I21141577bbf380d89163ba106ad5c10c001c6185
Reviewed-on: https://gerrit.franz.com:9080/c/aserve/+/21144
Reviewed-by: Duane Rettig <[email protected]>
Reviewed-by: Robert Rorschach <[email protected]>
Reviewed-by: Kevin Layer <[email protected]>
Reviewed-by: John Foderaro <[email protected]>
Tested-by: Kevin Layer <[email protected]>
  • Loading branch information
Duane Rettig authored and dklayer committed Sep 9, 2022
1 parent 1ba22b3 commit f4c8bec
Showing 1 changed file with 32 additions and 24 deletions.
56 changes: 32 additions & 24 deletions main.cl
Original file line number Diff line number Diff line change
Expand Up @@ -789,23 +789,27 @@ after the connection goes idle")
(,g-check-modified ,check-modified)
(,g-trailers ,trailers)
)
(catch 'with-http-response
;(format t "timeout is ~d~%" ,g-timeout)
(if* ,g-trailers then (check-trailers-ok ,g-req ,g-trailers))
(compute-strategy ,g-req ,g-ent ,g-format)
(up-to-date-check ,g-check-modified ,g-req ,g-ent)
(mp::with-timeout ((if* (and (fixnump ,g-timeout) ; ok w-t
(> ,g-timeout 0))
then ,g-timeout
else 9999999)
(timedout-response ,g-req ,g-ent))
,(if* response
then `(setf (request-reply-code ,g-req) ,response))
,(if* content-type
then `(setf (request-reply-content-type ,g-req) ,content-type)
else `(setf (request-reply-content-type ,g-req) (content-type ,g-ent)))
,@body
)))))
(#-(version>= 11)
progn
#+(version>= 11)
with-unreachable-code-allowed
(catch 'with-http-response
;(format t "timeout is ~d~%" ,g-timeout)
(if* ,g-trailers then (check-trailers-ok ,g-req ,g-trailers))
(compute-strategy ,g-req ,g-ent ,g-format)
(up-to-date-check ,g-check-modified ,g-req ,g-ent)
(mp::with-timeout ((if* (and (fixnump ,g-timeout) ; ok w-t
(> ,g-timeout 0))
then ,g-timeout
else 9999999)
(timedout-response ,g-req ,g-ent))
,(if* response
then `(setf (request-reply-code ,g-req) ,response))
,(if* content-type
then `(setf (request-reply-content-type ,g-req) ,content-type)
else `(setf (request-reply-content-type ,g-req) (content-type ,g-ent)))
,@body
))))))


#+(and allegro (version>= 6 0))
Expand Down Expand Up @@ -847,10 +851,14 @@ Problems with protocol may occur." (ef-name ef)))))
(declare (ignorable ,g-req ,g-ent ,g-external-format))

(compute-response-stream ,g-req ,g-ent)
(if* (entity-headers ,g-ent)
then (bulk-set-reply-headers ,g-req (entity-headers ,g-ent)))
(if* ,g-headers
then (bulk-set-reply-headers ,g-req ,g-headers))
(#-(version>= 11)
progn
#+(version>= 11)
with-unreachable-code-allowed
(if* (entity-headers ,g-ent)
then (bulk-set-reply-headers ,g-req (entity-headers ,g-ent)))
(if* ,g-headers
then (bulk-set-reply-headers ,g-req ,g-headers)))
(send-response-headers ,g-req ,g-ent :pre)
(if* (not (member :omit-body (request-reply-strategy ,g-req)
:test #'eq))
Expand Down Expand Up @@ -1518,8 +1526,8 @@ by keyword symbols and not by strings"
:backlog backlog

:type
*socket-stream-type*
))
*socket-stream-type*))
#+unix
(is-a-child))

#+unix
Expand Down Expand Up @@ -1578,7 +1586,7 @@ by keyword symbols and not by strings"
listeners)))


(if* is-a-child then (loop (sleep 10000)))
#+unix (if* is-a-child then (loop (sleep 10000)))

server
))
Expand Down

0 comments on commit f4c8bec

Please sign in to comment.