diff options
author | Peter Hofmann <scm@uninformativ.de> | 2014-06-19 11:05:18 +0200 |
---|---|---|
committer | Peter Hofmann <scm@uninformativ.de> | 2014-06-19 11:05:18 +0200 |
commit | bf09c23af1f59e4fbdb9b52d5a44dc59edc9f27e (patch) | |
tree | bd49a7a582aeec821e0a9b392e94d99c319f5780 | |
parent | dc751caff4b074a8f40a07df5212b83335590c16 (diff) | |
download | lariza-bf09c23af1f59e4fbdb9b52d5a44dc59edc9f27e.tar.gz |
Use -Wno-unused-parameter instead of void casts
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | browser.c | 46 |
2 files changed, 1 insertions, 47 deletions
@@ -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/'` @@ -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) { |