Kazunobu Kuriyama wrote:

> 2017-01-31 6:57 GMT+09:00 Bram Moolenaar <[email protected]>:
> 
> >
> > Patch 8.0.0273
> > Problem:    Dead code detected by Coverity when not using gnome.
> > Solution:   Rearrange the #ifdefs to avoid dead code.
> > Files:      src/gui_gtk_x11.c
> >
> >
> > *** ../vim-8.0.0272/src/gui_gtk_x11.c   2017-01-09 20:30:23.898717562
> > +0100
> > --- src/gui_gtk_x11.c   2017-01-30 22:45:03.999637769 +0100
> >
> 
> <snip>
> 
> 
> > *** 3192,3198 ****
> > --- 3192,3201 ----
> >             item_orientation = bonobo_dock_item_get_orientation(dockitem);
> >         }
> >       }
> > + # else
> > + #  define item_orientation GTK_ORIENTATION_HORIZONTAL
> >   # endif
> > +
> >   # if GTK_CHECK_VERSION(3,0,0)
> >       if (widget != NULL
> >             && item_orientation == orientation
> > ***************
> > *** 3210,3224 ****
> > --- 3213,3235 ----
> >
> >         gtk_widget_get_allocation(widget, &allocation);
> >
> > + #  ifdef FEAT_GUI_GNOME
> >         if (orientation == GTK_ORIENTATION_HORIZONTAL)
> >             return allocation.height;
> >         else
> >             return allocation.width;
> > + #  else
> > +       return allocation.height;
> > + #endif
> >
> 
> Since FEAT_GUI_GNOME only makes sense with GTK+ 2, and since the #ifdef
> block above is enclosed with GTK_CHECK_VERSION(3,0,0), we can reduce the
> amount of code a little further as shown in the attached patch.

Thanks!

-- 
In Africa some of the native tribes have a custom of beating the ground
with clubs and uttering spine chilling cries.  Anthropologists call
this a form of primitive self-expression.  In America we call it golf.

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui