changeset 10767:a8ce0dbbb1d0 v8.0.0273

patch 8.0.0273: dead code detected by Coverity commit https://github.com/vim/vim/commit/c4a249a736d40ec54794827ef95804c225d0e38f Author: Bram Moolenaar <Bram@vim.org> Date: Mon Jan 30 22:56:48 2017 +0100 patch 8.0.0273: dead code detected by Coverity Problem: Dead code detected by Coverity when not using gnome. Solution: Rearrange the #ifdefs to avoid dead code.
author Christian Brabandt <cb@256bit.org>
date Mon, 30 Jan 2017 23:00:05 +0100
parents 34c2934fc222
children 14c7e1c23ebb
files src/gui_gtk_x11.c src/version.c
diffstat 2 files changed, 14 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/gui_gtk_x11.c
+++ b/src/gui_gtk_x11.c
@@ -3171,9 +3171,9 @@ delete_event_cb(GtkWidget *widget UNUSED
     static int
 get_item_dimensions(GtkWidget *widget, GtkOrientation orientation)
 {
+# ifdef FEAT_GUI_GNOME
     GtkOrientation item_orientation = GTK_ORIENTATION_HORIZONTAL;
 
-# ifdef FEAT_GUI_GNOME
     if (using_gnome && widget != NULL)
     {
 	GtkWidget *parent;
@@ -3192,7 +3192,10 @@ get_item_dimensions(GtkWidget *widget, G
 	    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,15 +3213,23 @@ get_item_dimensions(GtkWidget *widget, G
 
 	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;
--- a/src/version.c
+++ b/src/version.c
@@ -765,6 +765,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    273,
+/**/
     272,
 /**/
     271,