From eae3d2cbe217e6644c565b88f72f0830f6b4451c Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Fri, 20 Jan 2023 17:55:48 +0200 Subject: [PATCH 46/46] gtk: Fix testmatic build See osdn #46551 Signed-off-by: Marko Lindqvist --- client/gui-gtk-3.0/helpdlg.c | 3 +-- client/gui-gtk-3.22/helpdlg.c | 3 +-- client/gui-gtk-4.0/helpdlg.c | 3 +-- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/client/gui-gtk-3.0/helpdlg.c b/client/gui-gtk-3.0/helpdlg.c index 95bfc43155..5eabdab5ea 100644 --- a/client/gui-gtk-3.0/helpdlg.c +++ b/client/gui-gtk-3.0/helpdlg.c @@ -344,8 +344,7 @@ static void help_hyperlink_callback(GtkWidget *w) { const char *s; struct help_page_selection *select; - /* TODO: Make sure there's always valid select->type */ - enum help_page_type type BAD_HEURISTIC_INIT(HELP_LAST); + enum help_page_type type = HELP_LAST; s = gtk_label_get_text(GTK_LABEL(w)); select = (struct help_page_selection *)(g_object_get_data(G_OBJECT(w), "page_type")); diff --git a/client/gui-gtk-3.22/helpdlg.c b/client/gui-gtk-3.22/helpdlg.c index 45abdec47a..9eac4141a8 100644 --- a/client/gui-gtk-3.22/helpdlg.c +++ b/client/gui-gtk-3.22/helpdlg.c @@ -345,8 +345,7 @@ static void help_hyperlink_callback(GtkWidget *w) { const char *s; struct help_page_selection *select; - /* TODO: Make sure there's always valid select->type */ - enum help_page_type type BAD_HEURISTIC_INIT(HELP_LAST); + enum help_page_type type = HELP_LAST; s = gtk_label_get_text(GTK_LABEL(w)); select = (struct help_page_selection *)(g_object_get_data(G_OBJECT(w), "page_type")); diff --git a/client/gui-gtk-4.0/helpdlg.c b/client/gui-gtk-4.0/helpdlg.c index 5b658b6935..abfb31f6a6 100644 --- a/client/gui-gtk-4.0/helpdlg.c +++ b/client/gui-gtk-4.0/helpdlg.c @@ -344,8 +344,7 @@ static void help_hyperlink_callback(GtkWidget *w) { const char *s; struct help_page_selection *select; - /* TODO: Make sure there's always valid select->type */ - enum help_page_type type BAD_HEURISTIC_INIT(HELP_LAST); + enum help_page_type type = HELP_LAST; s = gtk_label_get_text(GTK_LABEL(w)); select = (struct help_page_selection *)(g_object_get_data(G_OBJECT(w), "page_type")); -- 2.39.0