b43: silence a bogus gcc warning
PATCH 1/1 b43: silence a bogus gcc warning
=46rom: Frank Lichtenheld <[email protected]>
inititalise ret to 0 to avoid the following bogus warning:
CC [M] drivers/net/wireless/b43/debugfs.odrivers/net/wireless/b43/debugfs.c: In function =E2=80=98b43_debugfs_re= ad=E2=80=99:drivers/net/wireless/b43/debugfs.c:355: warning: =E2=80=98ret=E2=80=99 = may be used uninitialized in this function
--- drivers/net/wireless/b43/debugfs.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/net/wireless/= renamed from drivers/net/wireless/b43/debugfs.c +0 -0
b43/debugfs.c
index 734e70e..d8ac058 100644
drivers/net/wireless/b43/debugfs.c +0 -0
@@ -352,7 +352,7 @@ static ssize_t b43_debugfs_read(struct file *file, =
char __user *userbuf,
struct b43_wldev *dev;
struct b43_debugfs_fops *dfops; struct b43_dfs_file *dfile;
- ssize_t ret;
+ ssize_t ret =3D 0;
char *buf;
const size_t bufsize =3D 1024 * 128; const size_t buforder =3D get_order(bufsize);
--=20
1.5.3.4
-------------------------------------------------------
--=20
Greetings Michael.
-
To unsubscribe from this list: send the line "unsubscribe linux-wireles= s" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 5 lines · Michael Buesch
From: Frank Lichtenheld <[email protected]>
=20
inititalise ret to 0 to avoid the following bogus warning:
CC [M]drivers/net/wireless/b43/debugfs.odrivers/net/wireless/b43/debugfs.c: In function =E2=80=98b43_debugfs_=
read=E2=80=99:
Quoted 1 line
drivers/net/wireless/b43/debugfs.c:355: warning: =E2=80=98ret=E2=80=99=
may be used uninitialized in this function
Quoted 3 lines
=20
Signed-off-by Frank Lichtenheld <[email protected]>Signed-off-by Michael Buesch <[email protected]>
Isn't this what uninitialized_var() is for?
--=20
John W. Linville
[email protected]
-
To unsubscribe from this list: send the line "unsubscribe linux-wireles= s" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 6 lines · On Saturday 10 November 2007 16:25:33 John W. Linville wrote:
Quoted 5 lines · Michael Buesch
From: Frank Lichtenheld <[email protected]>
=20
inititalise ret to 0 to avoid the following bogus warning:
CC [M]drivers/net/wireless/b43/debugfs.odrivers/net/wireless/b43/debugfs.c: In function =E2=80=98b43_debugf=
s_read=E2=80=99:
Quoted 1 line
Quoted 1 line
drivers/net/wireless/b43/debugfs.c:355: warning: =E2=80=98ret=E2=80=
=99 may be used uninitialized in this function
Quoted 6 lines
Quoted 3 lines
=20
Signed-off-by Frank Lichtenheld <[email protected]>Signed-off-by Michael Buesch <[email protected]>=20
Isn't this whatuninitialized_var()is for?
=20
I'd be OK with that, too.
--=20
Greetings Michael.
-
To unsubscribe from this list: send the line "unsubscribe linux-wireles= s" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 7 lines · Michael Buesch
Quoted 6 lines · On Saturday 10 November 2007 16:25:33 John W. Linville wrote:
Quoted 5 lines · Michael Buesch
From: Frank Lichtenheld <[email protected]>
=20
inititalise ret to 0 to avoid the following bogus warning:
CC [M]drivers/net/wireless/b43/debugfs.odrivers/net/wireless/b43/debugfs.c: In function =E2=80=98b43_debu=
gfs_read=E2=80=99:
Quoted 1 line
Quoted 1 line
Quoted 1 line
drivers/net/wireless/b43/debugfs.c:355: warning: =E2=80=98ret=E2=80=
=99 may be used uninitialized in this function
Quoted 5 lines
Quoted 5 lines
Quoted 3 lines
=20
Signed-off-by Frank Lichtenheld <[email protected]>Signed-off-by Michael Buesch <[email protected]>=20
Isn't this whatuninitialized_var()is for?
Erh, I didn't actually knew that existed, sorry.
OTOH in this case it is actually longer to write.
Quoted 1 line
I'd be OK with that, too.
Should I send a changed patch?
Gruesse,
--=20
=46rank Lichtenheld <[email protected]>
www: http://www.djpig.de/
-
To unsubscribe from this list: send the line "unsubscribe linux-wireles= s" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 8 lines · On Sunday 11 November 2007 10:27:03 Frank Lichtenheld wrote:
Quoted 7 lines · Michael Buesch
Quoted 6 lines · On Saturday 10 November 2007 16:25:33 John W. Linville wrote:
Quoted 5 lines · Michael Buesch
From: Frank Lichtenheld <[email protected]>
=20
inititalise ret to 0 to avoid the following bogus warning:
CC [M]drivers/net/wireless/b43/debugfs.odrivers/net/wireless/b43/debugfs.c: In function =E2=80=98b43_de=
bugfs_read=E2=80=99:
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
drivers/net/wireless/b43/debugfs.c:355: warning: =E2=80=98ret=E2=
=80=99 may be used uninitialized in this function
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 3 lines
=20
Signed-off-by Frank Lichtenheld <[email protected]>Signed-off-by Michael Buesch <[email protected]>=20
Isn't this whatuninitialized_var()is for?
Quoted 7 lines
=20
Erh, I didn't actually knew that existed, sorry.
OTOH in this case it is actually longer to write.
=20Quoted 1 line
I'd be OK with that, too.
=20
Should I send a changed patch?
Yes.
--=20
Greetings Michael.
-
To unsubscribe from this list: send the line "unsubscribe linux-wireles= s" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH 1/1 b43: silence a bogus gcc warning
In reply to John W. Linvilleuse uninitialized_var() to avoid the following bogus warning:
CC [M] drivers/net/wireless/b43/debugfs.odrivers/net/wireless/b43/debugfs.c: In function =E2=80=98b43_debugfs_re= ad=E2=80=99:drivers/net/wireless/b43/debugfs.c:355: warning: =E2=80=98ret=E2=80=99 = may be used uninitialized in this function
--- drivers/net/wireless/b43/debugfs.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
Changed to use uninitialized_var()
drivers/net/wireless/= renamed from drivers/net/wireless/b43/debugfs.c +0 -0
b43/debugfs.c
index ef0075d..f84d063 100644
drivers/net/wireless/b43/debugfs.c +0 -0
@@ -352,7 +352,7 @@ static ssize_t b43_debugfs_read(struct file *file, =
char __user *userbuf,
struct b43_wldev *dev;
struct b43_debugfs_fops *dfops; struct b43_dfs_file *dfile;
- ssize_t ret;
+ ssize_t uninitialized_var(ret);
char *buf;
const size_t bufsize =3D 1024 * 128; const size_t buforder =3D get_order(bufsize);
--=20
1.5.3.4
-
To unsubscribe from this list: send the line "unsubscribe linux-wireles= s" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html