Message ID | 1298587628-18187-1-git-send-email-corentincj@iksaif.net |
---|---|
State | New |
Headers | show |
Thanks, applied. On Fri, Feb 25, 2011 at 12:47 AM, Corentin Chary <corentincj@iksaif.net> wrote: > ./bitops.h:192: warning: ‘old’ is used uninitialized in this function > > Signed-off-by: Corentin Chary <corentincj@iksaif.net> > --- > 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 > > >
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;
./bitops.h:192: warning: ‘old’ is used uninitialized in this function Signed-off-by: Corentin Chary <corentincj@iksaif.net> --- bitops.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)