emacs/test/lisp/emacs-lisp
Mattias Engdegård aef996cd34 Consolidate existing warnings about unused return values
Move the warning about unused return values from calls to
side-effect-free functions from the source-level optimiser to the code
generator, where it can be unified with the special-purpose warning
about unused values from `mapcar`.  This change also cures spurious
duplicate warnings about the same code, makes the warnings amenable to
suppression through `with-suppressed-warnings`, and now warns about
some unused values that weren't caught before.

* lisp/emacs-lisp/byte-opt.el (byte-optimize-form-code-walker):
Move warning away from here.
* lisp/emacs-lisp/byte-run.el (with-suppressed-warnings):
* lisp/emacs-lisp/bytecomp.el (byte-compile-warnings):
Doc string updates.
(byte-compile-form): Put the new warnings here.
(byte-compile-normal-call): Move mapcar warning away from here.
* lisp/emacs-lisp/bytecomp.el (byte-compile-ignore):
Compile args to `ignore` for value to avoid unused-value warnings, and
then discard the generated values immediately thereafter.  Mostly this
does not affect the generated code but in rare cases it might result
in slightly worse code.
* test/lisp/emacs-lisp/bytecomp-tests.el
(bytecomp-test--with-suppressed-warnings): Adapt test.
2023-04-08 19:34:30 +02:00
..
bytecomp-resources Don't rewrite set to setq of lexical variables 2022-09-22 14:54:15 +02:00
edebug-resources ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
eieio-tests ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
faceup-resources ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
faceup-tests ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
macroexp-resources ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
package-resources ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
pp-resources Fix pp-emacs-lisp-code printing of cons cells 2022-05-17 19:45:20 +02:00
shadow-resources Use lexical-binding in most remaining emacs-lisp tests 2020-04-30 12:09:51 +02:00
testcover-resources ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
backquote-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
backtrace-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
benchmark-tests.el Skip failing tests on Cygwin with native compilation (bug#62450) 2023-03-26 10:04:59 -04:00
bindat-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
bytecomp-tests.el Consolidate existing warnings about unused return values 2023-04-08 19:34:30 +02:00
cconv-tests.el Don't modify interactive closures destructively (Bug#60974). 2023-03-06 20:28:20 +05:30
check-declare-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
checkdoc-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
cl-extra-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
cl-generic-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
cl-lib-tests.el ; * cl-lib-tests.el: Suppress for the right function. 2023-01-03 14:30:16 +01:00
cl-macs-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
cl-preloaded-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
cl-print-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
cl-seq-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
comp-cstr-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
comp-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
copyright-tests.el ; * test/lisp/emacs-lisp/copyright-tests.el: Fix and future-safe. 2023-01-01 13:18:50 +01:00
derived-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
easy-mmode-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
edebug-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
ert-tests.el Remove useless unwind-protect forms, or make them useful as intended 2023-04-07 19:08:33 +02:00
ert-x-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
find-func-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
float-sup-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
generator-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
gv-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
hierarchy-tests.el Fix failing test for package Hierarchy 2022-10-28 10:33:18 +03:00
icons-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
let-alist-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
lisp-mnt-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
lisp-mode-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
lisp-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
macroexp-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
map-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
memory-report-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
multisession-tests.el Merge from origin/emacs-29 2023-01-01 05:47:47 -05:00
nadvice-tests.el ; * test/lisp/emacs-lisp/nadvice-tests.el: suppress some warnings 2023-02-21 12:32:48 +01:00
oclosure-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
package-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
pcase-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
pp-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
range-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
regexp-opt-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
ring-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
rmc-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
rx-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
seq-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
shadow-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
shortdoc-tests.el Fix shortdoc-tests when Unicode arrows can be displayed 2023-03-25 17:43:43 +01:00
subr-x-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
syntax-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
tabulated-list-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
testcover-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
text-property-search-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
thunk-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
timer-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
unsafep-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
vtable-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
warnings-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00