From e2338bb5ed27875dbc3e01386a085df5738443eb Mon Sep 17 00:00:00 2001 From: "Haelwenn (lanodan) Monnier" Date: Sun, 22 Mar 2020 19:03:30 +0100 Subject: badwolf.c: Fix clang-10 warnings --- badwolf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/badwolf.c b/badwolf.c index cb26dcf..e9f55fc 100644 --- a/badwolf.c +++ b/badwolf.c @@ -193,7 +193,7 @@ webView_tab_label_change(struct Client *browser, const gchar *title) { GtkWidget *notebook = browser->window->notebook; -#define title_IS_EMPTY (title == NULL) || (title == (const gchar *)"") +#define title_IS_EMPTY strnlen(title, 2) == 0 if(title_IS_EMPTY) title = webkit_web_view_get_title(browser->webView); if(title_IS_EMPTY) title = webkit_web_view_get_uri(browser->webView); @@ -744,7 +744,7 @@ badwolf_get_tab_position(GtkContainer *notebook, GtkWidget *child) int main(int argc, char *argv[]) { - struct Window *window = &(struct Window){NULL}; + struct Window *window = &(struct Window){NULL, NULL, NULL}; setlocale(LC_ALL, ""); bindtextdomain(PACKAGE, DATADIR "/locale"); bind_textdomain_codeset(PACKAGE, "UTF-8"); -- cgit v1.3.1-23-gd82d