From 9c5128866ea65ad300b40d47a9d43998dc8bc9f4 Mon Sep 17 00:00:00 2001 From: Henrik Rydberg Date: Tue, 22 Jun 2010 11:44:36 +0200 Subject: janitor: fix compiler warnings Signed-off-by: Henrik Rydberg --- src/common.h | 2 +- src/core.c | 1 + src/iobuf.c | 1 + src/match.c | 2 +- 4 files changed, 4 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/common.h b/src/common.h index 57d47a0..d1c8397 100644 --- a/src/common.h +++ b/src/common.h @@ -80,7 +80,7 @@ static inline int bitcount(unsigned v) /* boost-style foreach bit */ #define foreach_bit(i, m) \ - for (i = firstbit(m); i >= 0; i = firstbit((m) & (~0U << i + 1))) + for (i = firstbit(m); i >= 0; i = firstbit((m) & (~0U << (i + 1)))) /* robust system ioctl calls */ #define SYSCALL(call) while (((call) == -1) && (errno == EINTR)) diff --git a/src/core.c b/src/core.c index 91f6518..5790e3e 100644 --- a/src/core.c +++ b/src/core.c @@ -29,6 +29,7 @@ #include "state.h" #include "iobuf.h" #include "evbuf.h" +#include "match.h" static inline int istouch(const struct mtdev_slot *data, const struct mtdev_caps *caps) diff --git a/src/iobuf.c b/src/iobuf.c index b58fdf6..89345f3 100644 --- a/src/iobuf.c +++ b/src/iobuf.c @@ -28,6 +28,7 @@ #include "iobuf.h" #include "state.h" +#include #include int mtdev_idle(struct mtdev *dev, int fd, int ms) diff --git a/src/match.c b/src/match.c index 3eb582e..fcb3045 100644 --- a/src/match.c +++ b/src/match.c @@ -288,7 +288,7 @@ static void step4(int *ix, int *mdist, mat_t mstar, mat_t nmstar, mat_t mprime, col_t ccol, col_t crow, int nrows, int ncols, int dmin, int row, int col) { - int n, rstar, cstar, primeRow, primeCol; + int rstar, cstar, primeRow, primeCol; /* generate temporary copy of mstar */ memcpy(nmstar, mstar, sizeof(mat_t)); -- cgit v1.2.3