From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chong Yidong Newsgroups: gmane.emacs.devel Subject: Re: Nonsensical byte compiler warning. Date: Sun, 01 Apr 2007 14:10:18 -0400 Message-ID: <87lkhcj791.fsf@stupidchicken.com> References: <85ps6okoe5.fsf@lola.goethe.zz> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1175451048 4699 80.91.229.12 (1 Apr 2007 18:10:48 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 1 Apr 2007 18:10:48 +0000 (UTC) Cc: emacs-devel@gnu.org To: David Kastrup , Alan Mackenzie Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Apr 01 20:10:47 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1HY4Vp-00062J-NN for ged-emacs-devel@m.gmane.org; Sun, 01 Apr 2007 20:10:45 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HY4Yl-0001JZ-UR for ged-emacs-devel@m.gmane.org; Sun, 01 Apr 2007 14:13:47 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HY4Yi-0001Iw-2x for emacs-devel@gnu.org; Sun, 01 Apr 2007 14:13:44 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HY4Yg-0001Ij-ON for emacs-devel@gnu.org; Sun, 01 Apr 2007 14:13:42 -0400 Original-Received: from south-station-annex.mit.edu ([18.72.1.2]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1HY4Vj-0006Xa-OU; Sun, 01 Apr 2007 14:10:39 -0400 Original-Received: from central-city-carrier-station.mit.edu (CENTRAL-CITY-CARRIER-STATION.MIT.EDU [18.7.7.72]) by south-station-annex.mit.edu (8.13.6/8.9.2) with ESMTP id l31IAbEo027323; Sun, 1 Apr 2007 14:10:38 -0400 (EDT) Original-Received: from outgoing-legacy.mit.edu (OUTGOING-LEGACY.MIT.EDU [18.7.22.104]) by central-city-carrier-station.mit.edu (8.13.6/8.9.2) with ESMTP id l31IAQ0u008882; Sun, 1 Apr 2007 14:10:26 -0400 (EDT) Original-Received: from localhost ([18.19.7.211]) ) by outgoing-legacy.mit.edu (8.13.6/8.12.4) with ESMTP id l31IAIah020605; Sun, 1 Apr 2007 14:10:20 -0400 (EDT) Original-Received: from cyd by localhost with local (Exim 3.36 #1 (Debian)) id 1HY4VO-0002pi-00; Sun, 01 Apr 2007 14:10:18 -0400 In-Reply-To: <85ps6okoe5.fsf@lola.goethe.zz> (David Kastrup's message of "Sun\, 01 Apr 2007 19\:14\:42 +0200") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.96 (gnu/linux) X-Scanned-By: MIMEDefang 2.42 X-Spam-Score: -2.599 X-detected-kernel: Solaris 9.1 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:68893 Archived-At: David Kastrup 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)