summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMattias EngdegÄrd <mattiase@acm.org>2021-02-04 14:32:21 +0100
committerMattias EngdegÄrd <mattiase@acm.org>2021-02-06 20:22:24 +0100
commit4dc3231c91c339e602f59dcfee372017b92e4318 (patch)
treef600a3e24c5ddcc75d56150dfaabf3e45fc4df68
parent83983b6b7a115474572973b62eb5e42251713e63 (diff)
downloademacs-4dc3231c91c339e602f59dcfee372017b92e4318.tar.gz
Fix spurious warnings from unwise condition order in inlined code
These are both conditions having the form (and A B) where A is side-effect-free and B may be known to be nil at compile time. The compiler will then warn about A being useless and thrown away. The fix is to test B first. * lisp/gnus/gnus.el (gnus-method-to-server): Test `(not no-enter-cache)` first. (gnus-server-get-method): Test `group` first.
-rw-r--r--lisp/gnus/gnus.el7
1 files changed, 3 insertions, 4 deletions
diff --git a/lisp/gnus/gnus.el b/lisp/gnus/gnus.el
index 84e53da297b..98664ac2b44 100644
--- a/lisp/gnus/gnus.el
+++ b/lisp/gnus/gnus.el
@@ -3212,8 +3212,8 @@ that that variable is buffer-local to the summary buffers."
(format "%s" (car method))
(format "%s:%s" (car method) (cadr method))))
(name-method (cons name method)))
- (when (and (not (member name-method gnus-server-method-cache))
- (not no-enter-cache)
+ (when (and (not no-enter-cache)
+ (not (member name-method gnus-server-method-cache))
(not (assoc (car name-method) gnus-server-method-cache)))
(push name-method gnus-server-method-cache))
name)))
@@ -3273,8 +3273,7 @@ that that variable is buffer-local to the summary buffers."
(gnus-server-to-method method))
((equal method gnus-select-method)
gnus-select-method)
- ((and (stringp (car method))
- group)
+ ((and group (stringp (car method)))
(gnus-server-extend-method group method))
((and method
(not group)