emacs-devel
[Top][All Lists]
Advanced

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

Re: Nonsensical byte compiler warning.


From: Chong Yidong
Subject: Re: Nonsensical byte compiler warning.
Date: Sun, 01 Apr 2007 14:10:18 -0400
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.96 (gnu/linux)

David Kastrup <address@hidden> writes:

> when compiling the latest source (with "make cvs-update" in the lisp
> subdirectory), I get
>
> Compiling /home/tmp/emacs/lisp/progmodes/cc-cmds.el...
>
> In c-end-of-defun:
> progmodes/cc-cmds.el:1612:4:Warning: value returned by `char-after' is not
>     used
> Wrote /home/tmp/emacs/lisp/progmodes/cc-cmds.elc
>
> I have no idea where this compiler warning is supposed to come from.

I don't know why the byte-compiler printed this confusing message, but
it seems to be issuing a real warning.  There is a `when' statement at
cc-cmds.el:1633 that has no effect, because the return value of the
surrounding `if' form is discarded.

This is probably just a bit of cruft, and easily corrected
(eliminating the warning in the process).  Alan, could you verify
this?

*** emacs/lisp/progmodes/cc-cmds.el.~1.55.~     2007-03-30 18:31:07.000000000 
-0400
--- emacs/lisp/progmodes/cc-cmds.el     2007-04-01 14:05:04.000000000 -0400
***************
*** 1630,1639 ****
              (setq arg (1+ arg)))
          (if (< arg 0)
              (setq arg (c-backward-to-nth-BOF-{ (- arg) where)))
!         (when (and (= arg 0)
!                    (c-syntactic-skip-backward "^}")
!                    (eq (char-before) ?\}))
!           t))
  
        ;; Move forward to the } of a function
        (if (> arg 0)
--- 1630,1637 ----
              (setq arg (1+ arg)))
          (if (< arg 0)
              (setq arg (c-backward-to-nth-BOF-{ (- arg) where)))
!         (if (= arg 0)
!             (c-syntactic-skip-backward "^}")))
  
        ;; Move forward to the } of a function
        (if (> arg 0)




reply via email to

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