diff options
author | Henrik Rydberg <rydberg@euromail.se> | 2010-06-22 11:44:36 +0200 |
---|---|---|
committer | Henrik Rydberg <rydberg@euromail.se> | 2010-06-22 11:44:36 +0200 |
commit | 9c5128866ea65ad300b40d47a9d43998dc8bc9f4 (patch) | |
tree | c84646b77419d1231e6e966e638f7f09abae8d3d | |
parent | 0647b37dfc35145d74822844ad7e54bf5c218369 (diff) | |
download | mtdev-git-9c5128866ea65ad300b40d47a9d43998dc8bc9f4.tar.gz |
janitor: fix compiler warnings
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
-rw-r--r-- | src/common.h | 2 | ||||
-rw-r--r-- | src/core.c | 1 | ||||
-rw-r--r-- | src/iobuf.c | 1 | ||||
-rw-r--r-- | src/match.c | 2 | ||||
-rw-r--r-- | test/mtdev.c | 1 |
5 files changed, 5 insertions, 2 deletions
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)) @@ -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 <unistd.h> #include <poll.h> 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)); diff --git a/test/mtdev.c b/test/mtdev.c index a4858c5..7fb01ac 100644 --- a/test/mtdev.c +++ b/test/mtdev.c @@ -28,6 +28,7 @@ #include <mtdev.h> #include <stdio.h> +#include <unistd.h> #include <fcntl.h> /* year-proof millisecond event time */ |