From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.devel Subject: Re: compilation warning Date: Tue, 29 Jun 2010 07:55:15 +0200 Message-ID: <4C298AC3.1030405@gmx.at> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1277790987 27310 80.91.229.12 (29 Jun 2010 05:56:27 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 29 Jun 2010 05:56:27 +0000 (UTC) Cc: emacs-devel@gnu.org To: Dan Nicolaescu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jun 29 07:56:26 2010 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.69) (envelope-from ) id 1OTTnI-0003jh-Qc for ged-emacs-devel@m.gmane.org; Tue, 29 Jun 2010 07:56:25 +0200 Original-Received: from localhost ([127.0.0.1]:60330 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OTTnA-0006bz-HG for ged-emacs-devel@m.gmane.org; Tue, 29 Jun 2010 01:55:32 -0400 Original-Received: from [140.186.70.92] (port=54017 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OTTn1-0006bT-Om for emacs-devel@gnu.org; Tue, 29 Jun 2010 01:55:25 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OTTn0-0003dQ-C9 for emacs-devel@gnu.org; Tue, 29 Jun 2010 01:55:23 -0400 Original-Received: from mail.gmx.net ([213.165.64.20]:52471) by eggs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1OTTmz-0003cw-Vk for emacs-devel@gnu.org; Tue, 29 Jun 2010 01:55:22 -0400 Original-Received: (qmail invoked by alias); 29 Jun 2010 05:55:19 -0000 Original-Received: from 62-47-32-193.adsl.highway.telekom.at (EHLO [62.47.32.193]) [62.47.32.193] by mail.gmx.net (mp008) with SMTP; 29 Jun 2010 07:55:19 +0200 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX194PSkukmp4Rc0cLco9CTieY9rEGySIFFkuDy61cS x9fkJso1uby2ww User-Agent: Thunderbird 2.0.0.21 (Windows/20090302) In-Reply-To: X-Y-GMX-Trusted: 0 X-detected-operating-system: by eggs.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:126494 Archived-At: > emacs/src/frame.c:1390: warning: suggest braces around empty body in an 'if' statement > > The code in question is: > > if (NILP (Vrun_hooks) || !NILP (Fframe_parameter (frame, intern ("tooltip")))) > ; > > It looks a bit odd. What's the right fix here? I'm using *** src/frame.c 2010-04-20 01:50:52 +0000 --- src/frame.c 2010-06-29 05:36:07 +0000 *************** *** 1330,1335 **** --- 1330,1336 ---- struct kboard *kb; int minibuffer_selected; + int tooltip_frame = !NILP (Fframe_parameter (frame, intern ("tooltip"))); if (EQ (frame, Qnil)) { *************** *** 1385,1393 **** frame is a tooltip. FORCE is set to `noelisp' when handling a disconnect from the terminal, so we don't dare call Lisp code. */ ! if (NILP (Vrun_hooks) || !NILP (Fframe_parameter (frame, intern ("tooltip")))) ; ! if (EQ (force, Qnoelisp)) pending_funcalls = Fcons (list3 (Qrun_hook_with_args, Qdelete_frame_functions, frame), pending_funcalls); --- 1386,1394 ---- frame is a tooltip. FORCE is set to `noelisp' when handling a disconnect from the terminal, so we don't dare call Lisp code. */ ! if (NILP (Vrun_hooks) || tooltip_frame) ; ! else if (EQ (force, Qnoelisp)) pending_funcalls = Fcons (list3 (Qrun_hook_with_args, Qdelete_frame_functions, frame), pending_funcalls); *************** *** 1633,1639 **** } /* Cause frame titles to update--necessary if we now have just one frame. */ ! update_mode_lines = 1; return Qnil; } --- 1634,1641 ---- } /* Cause frame titles to update--necessary if we now have just one frame. */ ! if (!tooltip_frame) ! update_mode_lines = 1; return Qnil; }