qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] bitops: fix test_and_change_bit()


From: Blue Swirl
Subject: Re: [Qemu-devel] [PATCH] bitops: fix test_and_change_bit()
Date: Fri, 25 Feb 2011 20:07:40 +0200

Thanks, applied.

On Fri, Feb 25, 2011 at 12:47 AM, Corentin Chary <address@hidden> wrote:
> ./bitops.h:192: warning: ‘old’ is used uninitialized in this function
>
> Signed-off-by: Corentin Chary <address@hidden>
> ---
>  bitops.h |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/bitops.h b/bitops.h
> index ae7bcb1..e2b9df3 100644
> --- a/bitops.h
> +++ b/bitops.h
> @@ -187,7 +187,7 @@ static inline int test_and_change_bit(int nr, volatile 
> unsigned long *addr)
>  {
>        unsigned long mask = BIT_MASK(nr);
>        unsigned long *p = ((unsigned long *)addr) + BIT_WORD(nr);
> -       unsigned long old;
> +       unsigned long old = *p;
>
>        *p = old ^ mask;
>        return (old & mask) != 0;
> --
> 1.7.4.1
>
>
>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]