]> git.armaanb.net Git - chorizo.git/commitdiff
Use -Wno-unused-parameter instead of void casts
authorPeter Hofmann <scm@uninformativ.de>
Thu, 19 Jun 2014 09:05:18 +0000 (11:05 +0200)
committerPeter Hofmann <scm@uninformativ.de>
Thu, 19 Jun 2014 09:05:18 +0000 (11:05 +0200)
Makefile
browser.c

index bdace388074751c334230e21ed7b7945952c3344..185820f3b9b8f095586e2679b134e1c768fab44c 100644 (file)
--- 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/'`
index 2c6d9c568fe596c6eda81a8e2c9daca5589275a3..33bd32efab83e96f32c5dc48e9930d4a8f85c8eb 100644 (file)
--- 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)
        {