From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/66866 Path: news.gmane.org!not-for-mail From: Reiner Steib Newsgroups: gmane.emacs.devel,gmane.emacs.gnus.general Subject: Compiler warnings in nnir.el (was: nnir.el cleanup) Date: Thu, 24 Apr 2008 20:17:30 +0200 Message-ID: References: <87y77fiszu.fsf@ID-24456.user.uni-berlin.de> <87lk3fvw4l.fsf@ID-24456.user.uni-berlin.de> <873apmapq9.fsf_-_@ID-24456.user.uni-berlin.de> <87k5isa5vc.fsf@ID-24456.user.uni-berlin.de> <87hcdtep8k.fsf@ID-24456.user.uni-berlin.de> Reply-To: Reiner Steib NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1209061107 27864 80.91.229.12 (24 Apr 2008 18:18:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 24 Apr 2008 18:18:27 +0000 (UTC) Cc: ding@gnus.org, emacs-devel@gnu.org To: Christoph Conrad Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Apr 24 20:19:01 2008 connect(): Connection refused 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 1Jp626-0001K1-Qx for ged-emacs-devel@m.gmane.org; Thu, 24 Apr 2008 20:18:59 +0200 Original-Received: from localhost ([127.0.0.1]:48923 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Jp61Q-000727-Nt for ged-emacs-devel@m.gmane.org; Thu, 24 Apr 2008 14:18:16 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Jp61L-00071i-A0 for emacs-devel@gnu.org; Thu, 24 Apr 2008 14:18:11 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Jp61I-0006y6-1G for emacs-devel@gnu.org; Thu, 24 Apr 2008 14:18:11 -0400 Original-Received: from [199.232.76.173] (port=51167 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Jp61H-0006y1-Nq for emacs-devel@gnu.org; Thu, 24 Apr 2008 14:18:07 -0400 Original-Received: from mail.uni-ulm.de ([134.60.1.11]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Jp61H-0007E6-Bx for emacs-devel@gnu.org; Thu, 24 Apr 2008 14:18:07 -0400 Original-Received: from localhost (corona.rz.uni-ulm.de [134.60.1.50]) by mail.uni-ulm.de (8.14.2/8.14.2) with ESMTP id m3OII2se022771; Thu, 24 Apr 2008 20:18:02 +0200 (MEST) X-Face: 'bg&jY[8V'W&:=~6w"|>}#4/T; w~36ei4NNMyKRR.a$n=$|sWFPF1y]a\>6kc\*#GN]UDM| Ywv, vbL^XF1nIp\:F=$Ei2o&mEe:%N~, :3]vtQ~s9u$9izmX$IF@VgGl7/, ^dbuM<3|AO2}.%|%?kZ 2Y=@\U!~cll^=8Z9ihKq%wmUe1Ky(#kl3T'>Qk0Ia3mCBsTk?E(,X Mail-Followup-To: Christoph Conrad , ding@gnus.org, emacs-devel@gnu.org In-Reply-To: <87hcdtep8k.fsf@ID-24456.user.uni-berlin.de> (Christoph Conrad's message of "Tue, 22 Apr 2008 19:52:58 +0200") User-Agent: Gnus/5.110009 (No Gnus v0.9) Emacs/22.2.50 (gnu/linux) X-Virus-Scanned: by amavisd-new X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized. 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:95899 gmane.emacs.gnus.general:66866 Archived-At: [ Cc-ing emacs-devel ] On Tue, Apr 22 2008, Christoph Conrad wrote: >> Could you provide a patch that fixes/silences the Emacs 23 compiler >> warnings? > [...] One warning remains, i don't understand why. > > In nnir-run-namazu: > nnir.el:1475:28:Warning: reference to free variable `dirnam' > nnir.el:1475:28:Warning: reference to free variable `artno' > > Possibly it has to do with the usage of nnir-add-result, a macro, but i > don't understand why. Here's a simplified test case of the problem in contrib/nnir.el[1]. Maybe someone on emacs-devel can explain whether we should silence the compiler warnings, modify the code or if the byte-compiler should be improved. --8<---------------cut here---------------start------------->8--- (defmacro nnir-add-result-dummy (dirnam artno score prefix server artlist) "Ask `nnir-compose-result' to construct a result vector, and if it is non-nil, add it to artlist." `(let ((result (nnir-compose-result-dummy dirnam artno score prefix server))) (when (not (null result)) (push result artlist)))) (defun nnir-compose-result-dummy (dirnam article score prefix server) t) (defun nnir-run-namazu-dummy (query server &optional group) (let ((article-pattern "^[0-9]+$") artlist (qstring (cdr (assq 'query query))) (prefix "nnfoobar") score group article) (nnir-add-result-dummy group article score prefix server artlist))) --8<---------------cut here---------------end--------------->8--- In Emacs 22.2.50, I get: ,---- | Compiling file nnir-warnings.el at Thu Apr 24 20:08:09 2008 | | In nnir-run-namazu-dummy: | nnir-warnings.el:12:10:Warning: reference to free variable `dirnam' | nnir-warnings.el:12:10:Warning: reference to free variable `artno' `---- Bye, Reiner. [1] From contrib/ in the Gnus repository. nnir.el is not included in Emacs yet, since we wait for an assignment. -- ,,, (o o) ---ooO-(_)-Ooo--- | PGP key available | http://rsteib.home.pages.de/