imq / linuximq

Pseudo-driver for the intermediate queue device.

Home Page:https://imq.github.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

fix two warnings

lx1 opened this issue · comments

commented

Hallo

I would kindly ask to include a two-line patch to address two warnings, mainly because they make compiling fail with -Werror.
The warnings are about the skb_copy_stored_cb function which is defined but not used (it's ony use is commented to date), and a pointer cast to an integer.

Thank you for your work!!

There it is:

--- a/net/core/skbuff.c.orig    2015-08-12 07:54:58.855459871 +0200
+++ b/net/core/skbuff.c 2015-08-12 08:04:12.678420885 +0200
@@ -138,6 +138,7 @@
 }
 EXPORT_SYMBOL(skb_restore_cb);

+static void skb_copy_stored_cb(struct sk_buff *   , const struct sk_buff *     ) __attribute__ ((unused));
 static void skb_copy_stored_cb(struct sk_buff *new, const struct sk_buff *__old)
 {
    struct skb_cb_table *next;
@@ -779,7 +780,7 @@
    while (skb->cb_next != NULL) {
        if (net_ratelimit())
            pr_warn("IMQ: kfree_skb: skb->cb_next: %08x\n",
-               (unsigned int)skb->cb_next);
+               (unsigned int)(uintptr_t)skb->cb_next);

        skb_restore_cb(skb);
    }

Could you send one pull request please?

commented

Done. Please be patient, I don't know collaborative development tools like git :)

Sorry, I accept it late