From bf09c23af1f59e4fbdb9b52d5a44dc59edc9f27e Mon Sep 17 00:00:00 2001 From: Peter Hofmann Date: Thu, 19 Jun 2014 11:05:18 +0200 Subject: Use -Wno-unused-parameter instead of void casts --- Makefile | 2 +- browser.c | 46 ---------------------------------------------- 2 files changed, 1 insertion(+), 47 deletions(-) diff --git a/Makefile b/Makefile index bdace38..185820f 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -CFLAGS += -Wall -Wextra -O3 +CFLAGS += -Wall -Wextra -Wno-unused-parameter -O3 __NAME__ = lariza __NAME_UPPERCASE__ = `echo $(__NAME__) | sed 's/.*/\U&/'` __NAME_CAPITALIZED__ = `echo $(__NAME__) | sed 's/^./\U&\E/'` diff --git a/browser.c b/browser.c index 2c6d9c5..33bd32e 100644 --- a/browser.c +++ b/browser.c @@ -95,12 +95,6 @@ adblock(WebKitWebView *web_view, WebKitWebFrame *frame, GSList *it = adblock_patterns; const gchar *uri; - (void)web_view; - (void)frame; - (void)resource; - (void)response; - (void)data; - uri = webkit_network_request_get_uri(request); if (show_all_requests) fprintf(stderr, " -> %s\n", uri); @@ -161,9 +155,6 @@ client_destroy(GtkWidget *obj, gpointer data) { struct Client *c = (struct Client *)data; - (void)obj; - (void)data; - free(c); clients--; @@ -176,8 +167,6 @@ client_destroy_request(WebKitWebView *web_view, gpointer data) { struct Client *c = (struct Client *)data; - (void)web_view; - gtk_widget_destroy(c->win); return TRUE; @@ -319,10 +308,6 @@ client_new(const gchar *uri) WebKitWebView * client_new_request(WebKitWebView *web_view, WebKitWebFrame *frame, gpointer data) { - (void)web_view; - (void)frame; - (void)data; - return client_new(NULL); } @@ -367,9 +352,6 @@ changed_load_progress(GObject *obj, GParamSpec *pspec, gpointer data) struct Client *c = (struct Client *)data; gdouble p; - (void)obj; - (void)pspec; - p = webkit_web_view_get_progress(WEBKIT_WEB_VIEW(c->web_view)); gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(c->progress), p); } @@ -380,9 +362,6 @@ changed_title(GObject *obj, GParamSpec *pspec, gpointer data) const gchar *t; struct Client *c = (struct Client *)data; - (void)obj; - (void)pspec; - t = webkit_web_view_get_title(WEBKIT_WEB_VIEW(c->web_view)); gtk_window_set_title(GTK_WINDOW(c->win), (t == NULL ? __NAME__ : t)); } @@ -393,9 +372,6 @@ changed_uri(GObject *obj, GParamSpec *pspec, gpointer data) const gchar *t; struct Client *c = (struct Client *)data; - (void)obj; - (void)pspec; - t = webkit_web_view_get_uri(WEBKIT_WEB_VIEW(c->web_view)); gtk_entry_set_text(GTK_ENTRY(c->location), (t == NULL ? __NAME__ : t)); } @@ -409,9 +385,6 @@ download_handle(WebKitWebView *web_view, WebKitDownload *download, gpointer data gboolean ret; int suffix = 1; - (void)web_view; - (void)data; - path = g_build_filename(download_dir, webkit_download_get_suggested_filename(download), NULL); @@ -477,10 +450,6 @@ download_request(WebKitWebView *web_view, WebKitWebFrame *frame, WebKitNetworkRequest *request, gchar *mime_type, WebKitWebPolicyDecision *policy_decision, gpointer data) { - (void)frame; - (void)request; - (void)data; - if (!webkit_web_view_can_show_mime_type(web_view, mime_type)) { webkit_web_policy_decision_download(policy_decision); @@ -508,8 +477,6 @@ downloadmanager_progress(GObject *obj, GParamSpec *pspec, gpointer data) gdouble p; gchar *t; - (void)pspec; - p = webkit_download_get_progress(download) * 100; t = g_strdup_printf("%s (%.0f%%)", webkit_download_get_suggested_filename(download), @@ -591,9 +558,6 @@ hover_web_view(WebKitWebView *web_view, gchar *title, gchar *uri, gpointer data) { struct Client *c = (struct Client *)data; - (void)web_view; - (void)title; - if (!gtk_widget_is_focus(c->location)) { if (uri == NULL) @@ -607,9 +571,6 @@ hover_web_view(WebKitWebView *web_view, gchar *title, gchar *uri, gpointer data) gboolean key_downloadmanager(GtkWidget *widget, GdkEvent *event, gpointer data) { - (void)widget; - (void)data; - if (event->type == GDK_KEY_PRESS) { if (((GdkEventKey *)event)->state & GDK_MOD1_MASK) @@ -633,8 +594,6 @@ key_location(GtkWidget *widget, GdkEvent *event, gpointer data) const gchar *t; gchar *f; - (void)widget; - if (event->type == GDK_KEY_PRESS) { if (((GdkEventKey *)event)->state & GDK_MOD1_MASK) @@ -702,8 +661,6 @@ key_web_view(GtkWidget *widget, GdkEvent *event, gpointer data) gfloat z; gboolean b; - (void)widget; - if (event->type == GDK_KEY_PRESS) { if (((GdkEventKey *)event)->state & GDK_MOD1_MASK) @@ -886,9 +843,6 @@ remote_msg(GIOChannel *channel, GIOCondition condition, gpointer data) { gchar *uri = NULL; - (void)condition; - (void)data; - g_io_channel_read_line(channel, &uri, NULL, NULL, NULL); if (uri) { -- cgit v1.2.3