[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',
right?
But I can't really see any practical way of using
`with-suppressed-warnings' here... Unless...
(with-suppressed-warnings ((unused foo))
(defun bar (foo)
nil))
?
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
- Re: Towards a cleaner build, Lars Ingebrigtsen, 2019/06/09
- Re: Towards a cleaner build,
Lars Ingebrigtsen <=
- Re: Towards a cleaner build, Noam Postavsky, 2019/06/09
- Re: Towards a cleaner build, Lars Ingebrigtsen, 2019/06/09
- Re: Towards a cleaner build, Stefan Monnier, 2019/06/09
- Re: Towards a cleaner build, Lars Ingebrigtsen, 2019/06/09
- Re: Towards a cleaner build, Lars Ingebrigtsen, 2019/06/09
- Re: Towards a cleaner build, Eli Zaretskii, 2019/06/11
- Re: Towards a cleaner build, Lars Ingebrigtsen, 2019/06/12
- Re: Towards a cleaner build, Lars Ingebrigtsen, 2019/06/12
- Re: Towards a cleaner build, Stefan Monnier, 2019/06/12
- Re: Towards a cleaner build, Lars Ingebrigtsen, 2019/06/12