[Openmcl-devel] Muffling "unused lexical variable" during compilation

Zach Beane xach at xach.com
Fri Nov 18 07:27:08 PST 2016


Thanks.

Here's what I used in the interim:

(defun unused-lexical-warning-p (condition)
  (search "Unused lexical" (princ-to-string condition)))

(deftype unused-lexical-warning ()
  `(satisfies unused-lexical-warning-p))

(handler-bind ((unused-lexical-warning #'muffle-warning))
  (compile-stuff))


I'll update UNUSED-LEXICAL-WARNING-P with your suggestion.

Zach

On Thu, Nov 17, 2016 at 7:41 PM, Gail Zacharias <gz at clozure.com> wrote:

> Something like this (untested):
>
> (handler-bind
>   ((ccl:compiler-warning
>     (lambda (c)
>       (when (eq (ccl::compiler-warning-warning-type c) :unused)
>         (muffle-warning c)))))
>  (compile-my-system))
>
>
>
> On Thu, Nov 17, 2016 at 1:43 PM, Zach Beane <xach at xach.com> wrote:
>
>> Is there an easy way to muffle "unused lexical variable" notices during
>> compilation? I know they are useful, but I am working on a project that has
>> more important warnings to deal with, so the lexical variable notices are
>> obscuring things.
>>
>> Zach
>>
>>
>> _______________________________________________
>> Openmcl-devel mailing list
>> Openmcl-devel at clozure.com
>> https://lists.clozure.com/mailman/listinfo/openmcl-devel
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.clozure.com/pipermail/openmcl-devel/attachments/20161118/0c12c844/attachment.htm>


More information about the Openmcl-devel mailing list