Skip to content
Snippets Groups Projects
Commit c6236d0f authored by Robert Goldman's avatar Robert Goldman
Browse files

Merge branch...

Merge branch '142-with-temporary-file-gives-warnings-when-pathname-variable-is-not-used' into 'master'

Draft: Resolve "WITH-TEMPORARY-FILE gives warnings when pathname variable is not used"

Closes #142

See merge request asdf/asdf!221
parents fe6e3ab7 fa9d0d1d
No related branches found
No related tags found
No related merge requests found
......@@ -486,6 +486,22 @@
pn)))
(assert (not (probe-file pn4))))
(let (warning)
(handler-bind ((style-warning #'(lambda (c)
(setf warning c)
(muffle-warning c))))
(compile 'test-style-warning-function
'(lambda ()
(let (namestring)
(uiop:with-temporary-file (:stream str :pathname pn :direction :output :prefix "WTF5")
(format str "Checking variable usage.~%")
(setf namestring (namestring pn))
:close-stream
namestring)))))
(assert (null warning)))
(DBG :ensure-gethash)
(let ((h (make-hash-table :test 'equal)))
(assert-equal (multiple-value-list (gethash 1 h 2)) '(2 nil))
......
......@@ -672,7 +672,7 @@ Upon success, the KEEP form is evaluated and the file is is deleted unless it ev
,@before)))
,@(when after
(assert pathnamep)
`((,afterf (,pathname) ,@after))))
`((,afterf (,pathname) (declare (ignorable ,pathname)) ,@after))))
#-gcl (declare (dynamic-extent ,@(when before `(#',beforef)) ,@(when after `(#',afterf))))
(call-with-temporary-file
,(when before `#',beforef)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment