source path underlying type mismatch warning off
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SBCL |
Invalid
|
Medium
|
Unassigned |
Bug Description
If you compile
(defun set-file-position (stream position &optional (errorp t))
"Essentially like (FILE-POSITION STREAM POSITION) except this one
signals an error by default if the seek does not succeed."
(cond ((file-position stream position) position)
(errorp
(error "Could not set file-position to ~D on stream ~S."
(t nil)))
(defun search-stream (pattern stream &key start end from-end buffer-size)
(declarE (ignore from-end)) ; FIXME
(let* ((element-type (stream-
(buffer (make-array (or buffer-size 4096) :element-type element-type)))
(let ((pos (if start (set-file-position stream start) 0)))
(loop for n-read = (read-sequence buffer stream)
until (zerop n-read) do
(let* ((idx (search pattern buffer))
(cond ((not idx) (incf pos n-read))
In SLIME, the (AND IDX + POS IDX) will be highlighted, but SBCL actually
complains about the (>= POS* END) because END can be NIL.
Yup. To see this in action, change it to
and see the complaint disappear.