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
***************
*** 3171,3179 ****
      static int
  get_item_dimensions(GtkWidget *widget, GtkOrientation orientation)
  {
      GtkOrientation item_orientation = GTK_ORIENTATION_HORIZONTAL;
  
- # ifdef FEAT_GUI_GNOME
      if (using_gnome && widget != NULL)
      {
        GtkWidget *parent;
--- 3171,3179 ----
      static int
  get_item_dimensions(GtkWidget *widget, GtkOrientation orientation)
  {
+ # ifdef FEAT_GUI_GNOME
      GtkOrientation item_orientation = GTK_ORIENTATION_HORIZONTAL;
  
      if (using_gnome && widget != NULL)
      {
        GtkWidget *parent;
***************
*** 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
  # else
+ #  ifdef FEAT_GUI_GNOME
        if (orientation == GTK_ORIENTATION_HORIZONTAL)
            return widget->allocation.height;
        else
            return widget->allocation.width;
+ #  else
+       return widget->allocation.height;
+ #  endif
  # endif
      }
      return 0;
*** ../vim-8.0.0272/src/version.c       2017-01-30 22:00:56.625028477 +0100
--- src/version.c       2017-01-30 22:56:11.995257184 +0100
***************
*** 766,767 ****
--- 766,769 ----
  {   /* Add new patch number below this line */
+ /**/
+     273,
  /**/

-- 
       [Autumn changed into Winter ... Winter changed into Spring ...  Spring
       changed back into Autumn and Autumn gave Winter and Spring a miss and
       went straight on into Summer ...  Until one day ...]
                 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

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