[Git][cmucl/cmucl][rtoy-xoro-default] Fix compiler warning in VEC-INIT-XORO-STATE

Raymond Toy rtoy at common-lisp.net
Wed Dec 27 18:29:25 UTC 2017


Raymond Toy pushed to branch rtoy-xoro-default at cmucl / cmucl


Commits:
ab6d2c6a by Raymond Toy at 2017-12-27T10:29:26-08:00
Fix compiler warning in VEC-INIT-XORO-STATE

Set default value for state in VEC-INIT-XORO-STATE.  If not given,
initialize it to the correct array.

- - - - -


1 changed file:

- src/code/rand-xoroshiro.lisp


Changes:

=====================================
src/code/rand-xoroshiro.lisp
=====================================
--- a/src/code/rand-xoroshiro.lisp
+++ b/src/code/rand-xoroshiro.lisp
@@ -85,7 +85,7 @@
 		 (aref state 1) (make-double s1))
 	   state))))
 
-(defun vec-init-xoro-state (key &optional state)
+(defun vec-init-xoro-state (key &optional (state (make-array 2 :element-type 'double-float)))
   (declare (type (array (unsigned-byte 64) (2)) key)
 	   (type (simple-array double-float (2)) state))
   (flet ((make-double (x)



View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/commit/ab6d2c6a540ff87109a6bbcd7f61c3147bc2b234

---
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/commit/ab6d2c6a540ff87109a6bbcd7f61c3147bc2b234
You're receiving this email because of your account on gitlab.common-lisp.net.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/cmucl-cvs/attachments/20171227/bca1e1d1/attachment-0001.html>


More information about the cmucl-cvs mailing list