logo

badwolf

Minimalist and privacy-oriented WebKitGTK+ browser
commit: e2338bb5ed27875dbc3e01386a085df5738443eb
parent: 3cb8242cf282c82664e239e05f91ead3a2ab2dfa
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Sun, 22 Mar 2020 19:03:30 +0100

badwolf.c: Fix clang-10 warnings

Diffstat:

Mbadwolf.c4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git 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");