Subject: Re: bug#26486: 25.1.91; spurious warnings from cconv.el

From: Noam Postavsky <[email-masked]>
Date: Thu, 13 Apr 2017 15:28:21 -0400

retitle 26486 25.1.91; unused var warning from cconv.el can't be suppressed
severity 26486 minor
tag 26486 confirmed
quit

On Thu, Apr 13, 2017 at 2:59 PM, John Williams <[email-masked]> wrote:
> When I byte compile a file where a macro expansion introduces an unused
> lexical veriable, I get warnings from cconv.el, even if I wrap the
> expansion in (with-no-warnings) and set byte-compile-warnings to nil.
> IMHO warnings of this type should never be issued for code that comes
> from a macro expansion, but it should at least be possible to suppress
> them with the usual mechanisms.  Here's a file that demonstrates the
> problem when it's compiled with byte-compile-file:
>
> ========================================================================
> ;; -*- lexical-binding: t; byte-compile-warnings: nil  -*-
>
> (defmacro test ()
>   `(let (unused)))
>
> (with-no-warnings
>   (test))
> ========================================================================

This happens also without a macro.

;; -*- lexical-binding: t; byte-compile-warnings: nil  -*-
(with-no-warnings (let (unused)))