[cmucl/cmucl][master] Fix warnings about destructive functions discarding their results

Raymond Toy rtoy at common-lisp.net
Sat May 23 18:47:59 UTC 2015


Raymond Toy pushed to branch master at cmucl / cmucl


Commits:
63d1896f by Raymond Toy at 2015-05-23T11:47:18Z
Fix warnings about destructive functions discarding their results
(sort an delete)

- - - - -


2 changed files:

- src/hemlock/bit-screen.lisp
- src/hemlock/eval-server.lisp


Changes:

=====================================
src/hemlock/bit-screen.lisp
=====================================
--- a/src/hemlock/bit-screen.lisp
+++ b/src/hemlock/bit-screen.lisp
@@ -1581,10 +1581,11 @@
     ;; Probably shoulds insertion sort them, but I'm lame.
     ;;
     (xlib:with-state (xparent)
-      (sort affected-windows #'<
-	    :key #'(lambda (window)
-		     (xlib:drawable-y
-		      (bitmap-hunk-xwindow (window-hunk window))))))
+      (setf affected-windows
+	    (sort affected-windows #'<
+		  :key #'(lambda (window)
+			   (xlib:drawable-y
+			    (bitmap-hunk-xwindow (window-hunk window)))))))
     (let ((start 0))
       (declare (fixnum start))
       (do ((windows affected-windows (cdr windows)))


=====================================
src/hemlock/eval-server.lisp
=====================================
--- a/src/hemlock/eval-server.lisp
+++ b/src/hemlock/eval-server.lisp
@@ -223,7 +223,7 @@
 		  (find-if-not #'null array
 			       :from-end t
 			       :end current)))))
-    (delete nil array)
+    (setf array (delete nil array))
     (setf (server-info-error-index server)
 	  (position current array))))
 



View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/commit/63d1896f5c0d28371d9a7356d0556fe01120f637
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/cmucl-cvs/attachments/20150523/fa855161/attachment.html>


More information about the cmucl-cvs mailing list