[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH gnumach 3/3] linux: fix compiler warning
From: |
Samuel Thibault |
Subject: |
Re: [PATCH gnumach 3/3] linux: fix compiler warning |
Date: |
Fri, 19 Dec 2014 02:52:02 +0100 |
User-agent: |
Mutt/1.5.21+34 (58baf7c9f32f) (2010-12-30) |
Justus Winter, le Fri 19 Dec 2014 02:48:58 +0100, a écrit :
> If the loop above completes at least one iteration, `i' will be larger
> than zero.
Ack.
> * linux/dev/glue/block.c (rdwr_full): Add assertion to appease the
> compiler.
> ---
> linux/dev/glue/block.c | 1 +
> 1 file changed, 1 insertion(+)
>
> 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]);
> }
> --
> 2.1.3
>
--
Samuel
<c> tiens, je suis déçu
<c> quand on clique sur le bouton random de http://xkcd.com/221/ on ne tombe
pas (toujours) sur http://xkcd.com/4/
<c> bon, j'envoie un bug-report à l'auteur
Re: [PATCH gnumach 1/3] kern: improve assert, Samuel Thibault, 2014/12/20