imq / linuximq

Pseudo-driver for the intermediate queue device.
https://imq.github.io/
GNU General Public License v2.0
99 stars 51 forks source link

fix two warnings #25

Closed lx1 closed 9 years ago

lx1 commented 9 years ago

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);
    }
gfreewind commented 9 years ago

Could you send one pull request please?

lx1 commented 9 years ago

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

gfreewind commented 9 years ago

Sorry, I accept it late