From d15a29c876a464954b6b02cc5eb08f4d0b59c1c0 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sat, 31 Mar 2018 18:49:15 -0400 Subject: [PATCH] Defeat compiler optimization We always want to call both update functions here, and the compiler unhelpfully optimizes out the second call if the first one returns TRUE. --- gtk/gtkfontchooserwidget.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gtk/gtkfontchooserwidget.c b/gtk/gtkfontchooserwidget.c index 0eec375bb0..bd08336b3d 100644 --- a/gtk/gtkfontchooserwidget.c +++ b/gtk/gtkfontchooserwidget.c @@ -2241,8 +2241,10 @@ gtk_font_chooser_widget_merge_font_desc (GtkFontChooserWidget *fontchooser gtk_font_chooser_widget_update_marks (fontchooser); #if defined(HAVE_HARFBUZZ) && defined(HAVE_PANGOFT) - has_tweak = gtk_font_chooser_widget_update_font_variations (fontchooser) || - gtk_font_chooser_widget_update_font_features (fontchooser); + if (gtk_font_chooser_widget_update_font_features (fontchooser)) + has_tweak = TRUE; + if (gtk_font_chooser_widget_update_font_variations (fontchooser)) + has_tweak = TRUE; #endif g_simple_action_set_enabled (G_SIMPLE_ACTION (priv->tweak_action), has_tweak); } -- 2.30.2