emacs-diffs
[Top][All Lists]
Advanced

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

master 11c2ffd 2/2: Declare functions to silence byte-compiler


From: Stefan Kangas
Subject: master 11c2ffd 2/2: Declare functions to silence byte-compiler
Date: Tue, 21 Dec 2021 12:05:45 -0500 (EST)

branch: master
commit 11c2ffddc9fe039fe2b729818922d35a6e8a0369
Author: Stefan Kangas <stefan@marxist.se>
Commit: Stefan Kangas <stefan@marxist.se>

    Declare functions to silence byte-compiler
    
    * lisp/auth-source.el (gnutls-symmetric-decrypt, gnutls-ciphers):
    * lisp/net/dbus.el (libxml-parse-xml-region):
    * lisp/simple.el (thread-name):
    * lisp/thread.el (thread-name, thread-signal, thread--blocker)
    (current-thread, thread-live-p, all-threads):
    * test/lisp/emacs-lisp/multisession-tests.el (sqlite-close):
    * test/lisp/net/gnutls-tests.el (gnutls-symmetric-decrypt)
    (gnutls-symmetric-encrypt, gnutls-hash-mac, gnutls-hash-digest)
    (gnutls-ciphers, gnutls-digests, gnutls-macs):
    * test/lisp/net/network-stream-tests.el (gnutls-peer-status):
    * test/lisp/net/shr-tests.el (libxml-parse-html-region):
    * test/src/decompress-tests.el (zlib-decompress-region):
    * test/src/process-tests.el (thread-last-error, thread-join)
    (make-thread):
    * test/src/xml-tests.el (libxml-parse-xml-region): Declare
    functions to silence byte-compiler in --without-all builds.
---
 lisp/auth-source.el                        | 3 +++
 lisp/net/dbus.el                           | 1 +
 lisp/simple.el                             | 2 ++
 lisp/thread.el                             | 7 +++++++
 test/lisp/emacs-lisp/multisession-tests.el | 2 ++
 test/lisp/net/gnutls-tests.el              | 8 ++++++++
 test/lisp/net/network-stream-tests.el      | 2 ++
 test/lisp/net/shr-tests.el                 | 2 ++
 test/src/decompress-tests.el               | 2 ++
 test/src/process-tests.el                  | 4 ++++
 test/src/xml-tests.el                      | 2 ++
 11 files changed, 35 insertions(+)

diff --git a/lisp/auth-source.el b/lisp/auth-source.el
index 3c1a6fe..8c5b556 100644
--- a/lisp/auth-source.el
+++ b/lisp/auth-source.el
@@ -45,6 +45,9 @@
 (require 'cl-lib)
 (require 'eieio)
 
+(declare-function gnutls-symmetric-decrypt "gnutls.c")
+(declare-function gnutls-ciphers "gnutls.c")
+
 (autoload 'secrets-create-item "secrets")
 (autoload 'secrets-delete-item "secrets")
 (autoload 'secrets-get-alias "secrets")
diff --git a/lisp/net/dbus.el b/lisp/net/dbus.el
index 4112497..9e5d652 100644
--- a/lisp/net/dbus.el
+++ b/lisp/net/dbus.el
@@ -36,6 +36,7 @@
 ;; Declare used subroutines and variables.
 (declare-function dbus-message-internal "dbusbind.c")
 (declare-function dbus--init-bus "dbusbind.c")
+(declare-function libxml-parse-xml-region "xml.c")
 (defvar dbus-message-type-invalid)
 (defvar dbus-message-type-method-call)
 (defvar dbus-message-type-method-return)
diff --git a/lisp/simple.el b/lisp/simple.el
index b217aeb..6d46fc1 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -4702,6 +4702,8 @@ File name handlers might not support pty association, if 
PROGRAM is nil."
         (forward-line -1)
       (beginning-of-line))))
 
+(declare-function thread-name "thread.c")
+
 (defun list-processes--refresh ()
   "Recompute the list of processes for the Process List buffer.
 Also, delete any process that is exited or signaled."
diff --git a/lisp/thread.el b/lisp/thread.el
index efb058c..10b88dd 100644
--- a/lisp/thread.el
+++ b/lisp/thread.el
@@ -30,6 +30,13 @@
 (eval-when-compile (require 'pcase))
 (eval-when-compile (require 'subr-x))
 
+(declare-function thread-name "thread.c")
+(declare-function thread-signal "thread.c")
+(declare-function thread--blocker "thread.c")
+(declare-function current-thread "thread.c")
+(declare-function thread-live-p "thread.c")
+(declare-function all-threads "thread.c")
+
 ;;;###autoload
 (defun thread-handle-event (event)
   "Handle thread events, propagated by `thread-signal'.
diff --git a/test/lisp/emacs-lisp/multisession-tests.el 
b/test/lisp/emacs-lisp/multisession-tests.el
index 1bf0a53..f1dbbb2 100644
--- a/test/lisp/emacs-lisp/multisession-tests.el
+++ b/test/lisp/emacs-lisp/multisession-tests.el
@@ -26,6 +26,8 @@
 (require 'ert-x)
 (require 'cl-lib)
 
+(declare-function sqlite-close "sqlite.c")
+
 (ert-deftest multi-test-sqlite-simple ()
   (skip-unless (sqlite-available-p))
   (ert-with-temp-file dir
diff --git a/test/lisp/net/gnutls-tests.el b/test/lisp/net/gnutls-tests.el
index 76c00b7..f549ecd 100644
--- a/test/lisp/net/gnutls-tests.el
+++ b/test/lisp/net/gnutls-tests.el
@@ -30,6 +30,14 @@
 (require 'gnutls)
 (require 'hex-util)
 
+(declare-function gnutls-symmetric-decrypt "gnutls.c")
+(declare-function gnutls-symmetric-encrypt "gnutls.c")
+(declare-function gnutls-hash-mac "gnutls.c")
+(declare-function gnutls-hash-digest "gnutls.c")
+(declare-function gnutls-ciphers "gnutls.c")
+(declare-function gnutls-digests "gnutls.c")
+(declare-function gnutls-macs "gnutls.c")
+
 (defvar gnutls-tests-message-prefix "")
 
 (defsubst gnutls-tests-message (format-string &rest args)
diff --git a/test/lisp/net/network-stream-tests.el 
b/test/lisp/net/network-stream-tests.el
index 8f5bddb..1e1eacb 100644
--- a/test/lisp/net/network-stream-tests.el
+++ b/test/lisp/net/network-stream-tests.el
@@ -32,6 +32,8 @@
 ;; it pulls in nsm, which then makes the :nowait t' tests fail unless
 ;; we disable the nsm, which we do by binding 'network-security-level'
 
+(declare-function gnutls-peer-status "gnutls.c")
+
 (ert-deftest make-local-unix-server ()
   (skip-unless (featurep 'make-network-process '(:family local)))
   (let* ((file (make-temp-name "/tmp/server-test"))
diff --git a/test/lisp/net/shr-tests.el b/test/lisp/net/shr-tests.el
index bfb83f2..846ec1a 100644
--- a/test/lisp/net/shr-tests.el
+++ b/test/lisp/net/shr-tests.el
@@ -27,6 +27,8 @@
 (require 'ert-x)
 (require 'shr)
 
+(declare-function libxml-parse-html-region "xml.c")
+
 (defun shr-test (name)
   (with-temp-buffer
     (insert-file-contents (format (concat (ert-resource-directory) "/%s.html") 
name))
diff --git a/test/src/decompress-tests.el b/test/src/decompress-tests.el
index 1d25cf2..708d914 100644
--- a/test/src/decompress-tests.el
+++ b/test/src/decompress-tests.el
@@ -23,6 +23,8 @@
 
 (require 'ert)
 
+(declare-function zlib-decompress-region "decompress.c")
+
 (defvar zlib-tests-data-directory
   (expand-file-name "data/decompress" (getenv "EMACS_TEST_DIRECTORY"))
   "Directory containing zlib test data.")
diff --git a/test/src/process-tests.el b/test/src/process-tests.el
index f14a460..baa8257 100644
--- a/test/src/process-tests.el
+++ b/test/src/process-tests.el
@@ -31,6 +31,10 @@
 (require 'dns)
 (require 'url-http)
 
+(declare-function thread-last-error "thread.c")
+(declare-function thread-join "thread.c")
+(declare-function make-thread "thread.c")
+
 ;; Timeout in seconds; the test fails if the timeout is reached.
 (defvar process-test-sentinel-wait-timeout 2.0)
 
diff --git a/test/src/xml-tests.el b/test/src/xml-tests.el
index 7c4ca39..62d9e3f 100644
--- a/test/src/xml-tests.el
+++ b/test/src/xml-tests.el
@@ -27,6 +27,8 @@
 
 (require 'ert)
 
+(declare-function libxml-parse-xml-region "xml.c")
+
 (defvar libxml-tests--data-comments-preserved
   `(;; simple case
     ("<?xml version=\"1.0\"?><foo baz=\"true\">bar</foo>"



reply via email to

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