[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: compilation warning
From: |
Dan Nicolaescu |
Subject: |
Re: compilation warning |
Date: |
Thu, 01 Jul 2010 01:40:15 -0400 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) |
martin rudalics <address@hidden> 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;
> }
- Re: compilation warning,
Dan Nicolaescu <=