[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Towards a cleaner build

From: Lars Ingebrigtsen
Subject: Re: Towards a cleaner build
Date: Sun, 09 Jun 2019 16:53:50 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

I'm working my way through the different byte compilation warnings, and
suppressing is usually trivial.  But then there's this:

(defun cconv--analyze-use (vardata form varkind)
  "Analyze the use of a variable.


     (unless (or ;; Uninterned symbols typically come from macro-expansion, so
              ;; it is often non-trivial for the programmer to avoid such
              ;; unused vars.
              (not (intern-soft var))
              (eq ?_ (aref (symbol-name var) 0))
              ;; As a special exception, ignore "ignore".
              (eq var 'ignored))
       (byte-compile-warn "Unused lexical %s `%S'"
                          varkind var)))

It does not use `byte-compile-warning-enabled-p' at all -- is that a
bug?  It should be able to suppress those via `byte-compile-warnings',

But I can't really see any practical way of using
`with-suppressed-warnings' here...  Unless...

(with-suppressed-warnings ((unused foo))
  (defun bar (foo)


Looks kinda janky.  Perhaps a `declare' would be more sensible.  Or not
being able to use `with-suppressed-warnings' here.

(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no

reply via email to

[Prev in Thread] Current Thread [Next in Thread]