From e00936bf9f10cf44e1df71a7a11afd770e8a122a Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Sat, 26 Sep 2020 11:34:20 +0200 Subject: [PATCH] Silence some byte-compiler warnings * test/lisp/arc-mode-tests.el (arc-mode-test-archive-int-to-mode): * test/lisp/custom-tests.el (cus-test-opts): * test/lisp/help-fns-tests.el (foo-test-map) (help-fns-test--describe-keymap-foo): * test/src/fns-tests.el (w32-collate-ignore-punctuation) (fns-tests-func-arity): Silence byte-compiler warnings. --- test/lisp/arc-mode-tests.el | 2 +- test/lisp/custom-tests.el | 2 ++ test/lisp/help-fns-tests.el | 3 +++ test/src/fns-tests.el | 8 +++++--- 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/test/lisp/arc-mode-tests.el b/test/lisp/arc-mode-tests.el index 22ca7e2ec55..e92a4d28c6f 100644 --- a/test/lisp/arc-mode-tests.el +++ b/test/lisp/arc-mode-tests.el @@ -32,7 +32,7 @@ (cons 1024 "------S---") ; Bug#28092 (cons 2048 "---S------")))) (dolist (x alist) - (should (equal (cdr x) (archive-int-to-mode (car x))))))) + (should (equal (cdr x) (file-modes-number-to-symbolic (car x))))))) (ert-deftest arc-mode-test-zip-extract-gz () (skip-unless (and archive-zip-extract (executable-find (car archive-zip-extract)))) diff --git a/test/lisp/custom-tests.el b/test/lisp/custom-tests.el index 07f626fd65c..76661dc13b8 100644 --- a/test/lisp/custom-tests.el +++ b/test/lisp/custom-tests.el @@ -150,6 +150,8 @@ (defconst custom-test-admin-cus-test (expand-file-name "admin/cus-test.el" source-directory)) +(declare-function cus-test-opts custom-test-admin-cus-test) + (ert-deftest check-for-wrong-custom-types () :tags '(:expensive-test) (skip-unless (file-readable-p custom-test-admin-cus-test)) diff --git a/test/lisp/help-fns-tests.el b/test/lisp/help-fns-tests.el index da2b49e6b84..811b3677910 100644 --- a/test/lisp/help-fns-tests.el +++ b/test/lisp/help-fns-tests.el @@ -123,6 +123,9 @@ Return first line of the output of (describe-function-1 FUNC)." (goto-char (point-min)) (should (looking-at "^font-lock-comment-face is ")))) +(defvar foo-test-map) +(defvar help-fns-test--describe-keymap-foo) + ;;; Tests for describe-keymap (ert-deftest help-fns-test-find-keymap-name () diff --git a/test/src/fns-tests.el b/test/src/fns-tests.el index 323743d8420..f2e1a268b08 100644 --- a/test/src/fns-tests.el +++ b/test/src/fns-tests.el @@ -166,6 +166,8 @@ (should (equal (should-error (sort "cba" #'<) :type 'wrong-type-argument) '(wrong-type-argument list-or-vector-p "cba")))) +(defvar w32-collate-ignore-punctuation) + (ert-deftest fns-tests-collate-sort () (skip-unless (fns-tests--collate-enabled-p)) @@ -228,9 +230,9 @@ (should (equal (func-arity 'format) '(1 . many))) (require 'info) (should (equal (func-arity 'Info-goto-node) '(1 . 3))) - (should (equal (func-arity (lambda (&rest x))) '(0 . many))) - (should (equal (func-arity (eval '(lambda (x &optional y)) nil)) '(1 . 2))) - (should (equal (func-arity (eval '(lambda (x &optional y)) t)) '(1 . 2))) + (should (equal (func-arity (lambda (&rest _x))) '(0 . many))) + (should (equal (func-arity (eval '(lambda (_x &optional y)) nil)) '(1 . 2))) + (should (equal (func-arity (eval '(lambda (_x &optional y)) t)) '(1 . 2))) (should (equal (func-arity 'let) '(1 . unevalled)))) (defun fns-tests--string-repeat (s o) -- 2.39.5