Re: [PATCH] avoid compiler notes about unreachable code

Gary King <[email protected]> Fri, 14 Dec 2007 13:10:38 -0500
Newsgroups gmane.lisp.cclan.general
Message-ID <[email protected]>
Applied.

> Index: asdf.lisp
> ===================================================================
> RCS file: /cvsroot/cclan/asdf/asdf.lisp,v
> retrieving revision 1.110
> diff -u -r1.110 asdf.lisp
> --- asdf.lisp	27 Sep 2007 13:15:06 -0000	1.110
> +++ asdf.lisp	10 Dec 2007 15:07:55 -0000
> @@ -971,7 +971,9 @@
>     (aux key arglist)))
>
> (defmacro defsystem (name &body options)
> -  (destructuring-bind (&key pathname (class 'system) &allow-other- 
> keys) options
> +  (destructuring-bind (&key (pathname nil pathname-arg-p) (class  
> 'system)
> +                            &allow-other-keys)
> +      options
>     (let ((component-options (remove-keyword :class options)))
>       `(progn
> 	;; system must be registered before we parse the body, otherwise
> @@ -992,11 +994,13 @@
> 				   #'list
> 				   :module (coerce-name ',name)
> 				   :pathname
> -				   (or ,pathname
> -				       (when *load-truename*
> -					 (pathname-sans-name+type
> -					  (resolve-symlinks  *load-truename*)))
> -				       *default-pathname-defaults*)
> +				   ;; to avoid a note about unreachable code
> +				   ,(if pathname-arg-p
> +				        pathname
> +				        `(or (when *load-truename*
> +				               (pathname-sans-name+type
> +				                (resolve-symlinks *load-truename*)))
> +				             *default-pathname-defaults*))
> 				   ',component-options))))))
>
>

--
Gary Warren King, metabang.com
Cell: (413) 559 8738
Fax: (206) 338-4052
gwkkwg on Skype * garethsan on AIM





-------------------------------------------------------------------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services
for just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace