summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustus Winter <4winter@informatik.uni-hamburg.de>2014-12-19 02:02:44 +0100
committerJustus Winter <4winter@informatik.uni-hamburg.de>2015-02-20 18:59:50 +0100
commitf2550dfc73da3951b411157d73bb4ad7bd2ea0b2 (patch)
tree0175096031d530a85bfd11cac5bd868996e18a7f
parent739421ac52472d8dd2f23c141d449ff112fbf9b6 (diff)
linux: fix compiler warning
If the loop above completes at least one iteration, `i' will be larger than zero. * linux/dev/glue/block.c (rdwr_full): Add assertion to appease the compiler.
-rw-r--r--linux/dev/glue/block.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/linux/dev/glue/block.c b/linux/dev/glue/block.c
index 79a3646..da4ef38 100644
--- a/linux/dev/glue/block.c
+++ b/linux/dev/glue/block.c
@@ -624,6 +624,7 @@ rdwr_full (int rw, kdev_t dev, loff_t *off, char **buf, int *resid, int bshift)
}
if (! err)
{
+ assert (i > 0);
ll_rw_block (rw, i, bhp, 0);
wait_on_buffer (bhp[i - 1]);
}