From 31364ef0e24f1ceccdfe19cb022b14b1e75753f4 Mon Sep 17 00:00:00 2001 From: Daniel Borkmann Date: Sun, 1 May 2011 15:51:48 +0200 Subject: [PATCH] fixed compile warnings, removed unused enum --- src/xt_engine.c | 2 +- src/xt_fblock.h | 5 ----- src/xt_sched.c | 2 +- src/xt_vlink.c | 2 +- 4 files changed, 3 insertions(+), 8 deletions(-) diff --git a/src/xt_engine.c b/src/xt_engine.c index b286b96..751fc60 100644 --- a/src/xt_engine.c +++ b/src/xt_engine.c @@ -136,7 +136,7 @@ static int engine_procfs_stats(char *page, char **start, off_t offset, len += sprintf(page + len, "engine: %p\n", ppe); len += sprintf(page + len, "cpu: %u, numa node: %d\n", ppe->cpu, cpu_to_node(ppe->cpu)); - len += sprintf(page + len, "load: %lu\n", + len += sprintf(page + len, "load: %lld\n", atomic64_read(&ppe->load)); for (i = 0; i < NUM_TYPES; ++i) { do { diff --git a/src/xt_fblock.h b/src/xt_fblock.h index c33e20e..e0edf45 100644 --- a/src/xt_fblock.h +++ b/src/xt_fblock.h @@ -105,11 +105,6 @@ struct fblock { extern struct fblock *alloc_fblock(gfp_t flags); extern void kfree_fblock(struct fblock *p); -enum cleanup_mode { - CLEAN_FREE_PRIV, - CLEAN_NOFREE_PRIV, -}; - /* Initialize/cleanup a fblock object. */ extern int init_fblock(struct fblock *fb, char *name, void *priv, struct fblock_ops *ops); diff --git a/src/xt_sched.c b/src/xt_sched.c index 420031f..50ee16e 100644 --- a/src/xt_sched.c +++ b/src/xt_sched.c @@ -137,7 +137,7 @@ static int ppesched_procfs_write(struct file *file, const char __user *buffer, discipline = kzalloc(32, GFP_KERNEL); if (!discipline) return -ENOMEM; - len = min(sizeof(discipline), count); + len = min(sizeof(discipline), (size_t) count); if (copy_from_user(discipline, buffer, len)) { ret = -EFAULT; goto out; diff --git a/src/xt_vlink.c b/src/xt_vlink.c index cf67210..2228815 100644 --- a/src/xt_vlink.c +++ b/src/xt_vlink.c @@ -231,7 +231,7 @@ static int __vlink_invoke(struct vlink_subsys *n, struct vlinknlmsg *vmsg, struct nlmsghdr *nlh) { - int ret; + int ret = 0; struct vlink_callback *hb, *hn; hb = n->head; -- 2.11.4.GIT