unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Dan Nicolaescu <dann@gnu.org>
To: martin rudalics <rudalics@gmx.at>
Cc: emacs-devel@gnu.org
Subject: Re: compilation warning
Date: Thu, 01 Jul 2010 01:40:15 -0400	[thread overview]
Message-ID: <yxqmxubhi9s.fsf@fencepost.gnu.org> (raw)
In-Reply-To: <4C298AC3.1030405@gmx.at> (martin rudalics's message of "Tue\, 29 Jun 2010 07\:55\:15 +0200")

martin rudalics <rudalics@gmx.at> writes:

>> 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

Any reason not to check this in?


> *** 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;
>   }



  reply	other threads:[~2010-07-01  5:40 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-29  0:55 compilation warning Dan Nicolaescu
2010-06-29  1:38 ` Christoph
2010-06-29  5:55 ` martin rudalics
2010-07-01  5:40   ` Dan Nicolaescu [this message]
2010-07-02 16:35     ` Chong Yidong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=yxqmxubhi9s.fsf@fencepost.gnu.org \
    --to=dann@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=rudalics@gmx.at \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).