linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH][B43]: silence a bogus gcc warning
@ 2007-11-09  8:13 Frank Lichtenheld
  0 siblings, 0 replies; 7+ messages in thread
From: Frank Lichtenheld @ 2007-11-09  8:13 UTC (permalink / raw)
  To: Michael Buesch; +Cc: linux-wireless, Frank Lichtenheld

inititalise ret to 0 to avoid the following bogus warning:
  CC [M]  drivers/net/wireless/b43/debugfs.o
drivers/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

Signed-off-by: Frank Lichtenheld <frank@lichtenheld.de>
---
 drivers/net/wireless/b43/debugfs.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/wireless/b43/debugfs.c b/drivers/net/wireless/=
b43/debugfs.c
index 734e70e..d8ac058 100644
--- a/drivers/net/wireless/b43/debugfs.c
+++ b/drivers/net/wireless/b43/debugfs.c
@@ -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

-
To unsubscribe from this list: send the line "unsubscribe linux-wireles=
s" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH] b43: silence a bogus gcc warning
@ 2007-11-10 15:14 Michael Buesch
  2007-11-10 15:25 ` John W. Linville
  0 siblings, 1 reply; 7+ messages in thread
From: Michael Buesch @ 2007-11-10 15:14 UTC (permalink / raw)
  To: John Linville; +Cc: Frank Lichtenheld, bcm43xx-dev, linux-wireless

=46rom: Frank Lichtenheld <frank@lichtenheld.de>

inititalise ret to 0 to avoid the following bogus warning:
  CC [M]  drivers/net/wireless/b43/debugfs.o
drivers/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

Signed-off-by: Frank Lichtenheld <frank@lichtenheld.de>
Signed-off-by: Michael Buesch <mb@bu3sch.de>

---
 drivers/net/wireless/b43/debugfs.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/wireless/b43/debugfs.c b/drivers/net/wireless/=
b43/debugfs.c
index 734e70e..d8ac058 100644
--- a/drivers/net/wireless/b43/debugfs.c
+++ b/drivers/net/wireless/b43/debugfs.c
@@ -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 majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH] b43: silence a bogus gcc warning
  2007-11-10 15:14 [PATCH] b43: silence a bogus gcc warning Michael Buesch
@ 2007-11-10 15:25 ` John W. Linville
  2007-11-10 16:27   ` Michael Buesch
  2007-11-12 10:12   ` Frank Lichtenheld
  0 siblings, 2 replies; 7+ messages in thread
From: John W. Linville @ 2007-11-10 15:25 UTC (permalink / raw)
  To: Michael Buesch; +Cc: Frank Lichtenheld, bcm43xx-dev, linux-wireless

On Sat, Nov 10, 2007 at 04:14:03PM +0100, Michael Buesch wrote:
> From: Frank Lichtenheld <frank@lichtenheld.de>
>=20
> inititalise ret to 0 to avoid the following bogus warning:
>   CC [M]  drivers/net/wireless/b43/debugfs.o
> drivers/net/wireless/b43/debugfs.c: In function =E2=80=98b43_debugfs_=
read=E2=80=99:
> drivers/net/wireless/b43/debugfs.c:355: warning: =E2=80=98ret=E2=80=99=
 may be used uninitialized in this function
>=20
> Signed-off-by: Frank Lichtenheld <frank@lichtenheld.de>
> Signed-off-by: Michael Buesch <mb@bu3sch.de>

Isn't this what uninitialized_var() is for?

--=20
John W. Linville
linville@tuxdriver.com
-
To unsubscribe from this list: send the line "unsubscribe linux-wireles=
s" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] b43: silence a bogus gcc warning
  2007-11-10 15:25 ` John W. Linville
@ 2007-11-10 16:27   ` Michael Buesch
  2007-11-11  9:27     ` Frank Lichtenheld
  2007-11-12 10:12   ` Frank Lichtenheld
  1 sibling, 1 reply; 7+ messages in thread
From: Michael Buesch @ 2007-11-10 16:27 UTC (permalink / raw)
  To: John W. Linville; +Cc: Frank Lichtenheld, bcm43xx-dev, linux-wireless

On Saturday 10 November 2007 16:25:33 John W. Linville wrote:
> On Sat, Nov 10, 2007 at 04:14:03PM +0100, Michael Buesch wrote:
> > From: Frank Lichtenheld <frank@lichtenheld.de>
> >=20
> > inititalise ret to 0 to avoid the following bogus warning:
> >   CC [M]  drivers/net/wireless/b43/debugfs.o
> > drivers/net/wireless/b43/debugfs.c: In function =E2=80=98b43_debugf=
s_read=E2=80=99:
> > drivers/net/wireless/b43/debugfs.c:355: warning: =E2=80=98ret=E2=80=
=99 may be used uninitialized in this function
> >=20
> > Signed-off-by: Frank Lichtenheld <frank@lichtenheld.de>
> > Signed-off-by: Michael Buesch <mb@bu3sch.de>
>=20
> Isn't this what uninitialized_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 majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] b43: silence a bogus gcc warning
  2007-11-10 16:27   ` Michael Buesch
@ 2007-11-11  9:27     ` Frank Lichtenheld
  2007-11-11 11:23       ` Michael Buesch
  0 siblings, 1 reply; 7+ messages in thread
From: Frank Lichtenheld @ 2007-11-11  9:27 UTC (permalink / raw)
  To: Michael Buesch; +Cc: John W. Linville, bcm43xx-dev, linux-wireless

On Sat, Nov 10, 2007 at 05:27:43PM +0100, Michael Buesch wrote:
> On Saturday 10 November 2007 16:25:33 John W. Linville wrote:
> > On Sat, Nov 10, 2007 at 04:14:03PM +0100, Michael Buesch wrote:
> > > From: Frank Lichtenheld <frank@lichtenheld.de>
> > >=20
> > > inititalise ret to 0 to avoid the following bogus warning:
> > >   CC [M]  drivers/net/wireless/b43/debugfs.o
> > > drivers/net/wireless/b43/debugfs.c: In function =E2=80=98b43_debu=
gfs_read=E2=80=99:
> > > drivers/net/wireless/b43/debugfs.c:355: warning: =E2=80=98ret=E2=80=
=99 may be used uninitialized in this function
> > >=20
> > > Signed-off-by: Frank Lichtenheld <frank@lichtenheld.de>
> > > Signed-off-by: Michael Buesch <mb@bu3sch.de>
> >=20
> > Isn't this what uninitialized_var() is for?

Erh, I didn't actually knew that existed, sorry.
OTOH in this case it is actually longer to write.

> I'd be OK with that, too.

Should I send a changed patch?

Gruesse,
--=20
=46rank Lichtenheld <frank@lichtenheld.de>
www: http://www.djpig.de/
-
To unsubscribe from this list: send the line "unsubscribe linux-wireles=
s" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] b43: silence a bogus gcc warning
  2007-11-11  9:27     ` Frank Lichtenheld
@ 2007-11-11 11:23       ` Michael Buesch
  0 siblings, 0 replies; 7+ messages in thread
From: Michael Buesch @ 2007-11-11 11:23 UTC (permalink / raw)
  To: Frank Lichtenheld; +Cc: John W. Linville, bcm43xx-dev, linux-wireless

On Sunday 11 November 2007 10:27:03 Frank Lichtenheld wrote:
> On Sat, Nov 10, 2007 at 05:27:43PM +0100, Michael Buesch wrote:
> > On Saturday 10 November 2007 16:25:33 John W. Linville wrote:
> > > On Sat, Nov 10, 2007 at 04:14:03PM +0100, Michael Buesch wrote:
> > > > From: Frank Lichtenheld <frank@lichtenheld.de>
> > > >=20
> > > > inititalise ret to 0 to avoid the following bogus warning:
> > > >   CC [M]  drivers/net/wireless/b43/debugfs.o
> > > > drivers/net/wireless/b43/debugfs.c: In function =E2=80=98b43_de=
bugfs_read=E2=80=99:
> > > > drivers/net/wireless/b43/debugfs.c:355: warning: =E2=80=98ret=E2=
=80=99 may be used uninitialized in this function
> > > >=20
> > > > Signed-off-by: Frank Lichtenheld <frank@lichtenheld.de>
> > > > Signed-off-by: Michael Buesch <mb@bu3sch.de>
> > >=20
> > > Isn't this what uninitialized_var() is for?
>=20
> Erh, I didn't actually knew that existed, sorry.
> OTOH in this case it is actually longer to write.
>=20
> > 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 majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH] b43: silence a bogus gcc warning
  2007-11-10 15:25 ` John W. Linville
  2007-11-10 16:27   ` Michael Buesch
@ 2007-11-12 10:12   ` Frank Lichtenheld
  1 sibling, 0 replies; 7+ messages in thread
From: Frank Lichtenheld @ 2007-11-12 10:12 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, bcm43xx-dev, Frank Lichtenheld, Michael Buesch

use uninitialized_var() to avoid the following bogus warning:
  CC [M]  drivers/net/wireless/b43/debugfs.o
drivers/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

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: Frank Lichtenheld <frank@lichtenheld.de>
---
 drivers/net/wireless/b43/debugfs.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

 Changed to use uninitialized_var()

diff --git a/drivers/net/wireless/b43/debugfs.c b/drivers/net/wireless/=
b43/debugfs.c
index ef0075d..f84d063 100644
--- a/drivers/net/wireless/b43/debugfs.c
+++ b/drivers/net/wireless/b43/debugfs.c
@@ -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 majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2007-11-12 10:13 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-10 15:14 [PATCH] b43: silence a bogus gcc warning Michael Buesch
2007-11-10 15:25 ` John W. Linville
2007-11-10 16:27   ` Michael Buesch
2007-11-11  9:27     ` Frank Lichtenheld
2007-11-11 11:23       ` Michael Buesch
2007-11-12 10:12   ` Frank Lichtenheld
  -- strict thread matches above, loose matches on Subject: below --
2007-11-09  8:13 [PATCH][B43]: " Frank Lichtenheld

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).