Skip to content

Commit c4a249a

Browse files
committed
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.
1 parent 432c839 commit c4a249a

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

src/gui_gtk_x11.c

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3171,9 +3171,9 @@ delete_event_cb(GtkWidget *widget UNUSED,
31713171
static int
31723172
get_item_dimensions(GtkWidget *widget, GtkOrientation orientation)
31733173
{
3174+
# ifdef FEAT_GUI_GNOME
31743175
GtkOrientation item_orientation = GTK_ORIENTATION_HORIZONTAL;
31753176

3176-
# ifdef FEAT_GUI_GNOME
31773177
if (using_gnome && widget != NULL)
31783178
{
31793179
GtkWidget *parent;
@@ -3192,7 +3192,10 @@ get_item_dimensions(GtkWidget *widget, GtkOrientation orientation)
31923192
item_orientation = bonobo_dock_item_get_orientation(dockitem);
31933193
}
31943194
}
3195+
# else
3196+
# define item_orientation GTK_ORIENTATION_HORIZONTAL
31953197
# endif
3198+
31963199
# if GTK_CHECK_VERSION(3,0,0)
31973200
if (widget != NULL
31983201
&& item_orientation == orientation
@@ -3210,15 +3213,23 @@ get_item_dimensions(GtkWidget *widget, GtkOrientation orientation)
32103213

32113214
gtk_widget_get_allocation(widget, &allocation);
32123215

3216+
# ifdef FEAT_GUI_GNOME
32133217
if (orientation == GTK_ORIENTATION_HORIZONTAL)
32143218
return allocation.height;
32153219
else
32163220
return allocation.width;
3221+
# else
3222+
return allocation.height;
3223+
#endif
32173224
# else
3225+
# ifdef FEAT_GUI_GNOME
32183226
if (orientation == GTK_ORIENTATION_HORIZONTAL)
32193227
return widget->allocation.height;
32203228
else
32213229
return widget->allocation.width;
3230+
# else
3231+
return widget->allocation.height;
3232+
# endif
32223233
# endif
32233234
}
32243235
return 0;

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -764,6 +764,8 @@ static char *(features[]) =
764764

765765
static int included_patches[] =
766766
{ /* Add new patch number below this line */
767+
/**/
768+
273,
767769
/**/
768770
272,
769771
/**/

0 commit comments

Comments
 (0)