emacs-diffs
[Top][All Lists]
Advanced

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

master e00936b 2/2: Silence some byte-compiler warnings


From: Stefan Kangas
Subject: master e00936b 2/2: Silence some byte-compiler warnings
Date: Sat, 26 Sep 2020 06:42:49 -0400 (EDT)

branch: master
commit e00936bf9f10cf44e1df71a7a11afd770e8a122a
Author: Stefan Kangas <stefankangas@gmail.com>
Commit: Stefan Kangas <stefankangas@gmail.com>

    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 22ca7e2..e92a4d2 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 07f626f..76661dc 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 da2b49e..811b367 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 323743d..f2e1a26 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)



reply via email to

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