Remove btio.c compilation warning
PATCH 1/1 Remove btio.c compilation warning
From: Anderson Briglia <[email protected]>
This patch fixes a compilation warning regarding btio/btio.c compilation.
--- btio/btio.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
btio/btio.c +1 -1
@@ -800,7 +800,7 @@ static gboolean l2cap_get(int sock, GError **err, BtIOOption opt1,uint8_t dev_class[3 ];uint16_t handle;socklen_t len; -gboolean flushable; +gboolean flushable = TRUE; len =sizeof (l2o);memset (&l2o,0 , len);
Signature · 1 line
1.7.4.1
Quoted 4 lines · On Mon, 2 May 2011 16:43:26 -0400 [email protected] wrote:
From: Anderson Briglia <[email protected]>
This patch fixes a compilation warning regarding
btio/btio.ccompilation.
Just a general observation, when fixing compilation warnings/errors it is useful to put the actual message from the compiler in the commit log, this helps reviewers validating the patch as they see exactly which issue the fix addresses, but not only: there are chances the commit message will be indexed by search engines and we'll be helping others with similar issues searching for a solution on the web.
Regards,
Antonio
Signature · 8 lines
Antonio Ospite http://ao2.it PGP public key ID: 0x4553B001 A: Because it messes up the order in which people normally read text. See http://en.wikipedia.org/wiki/Posting_style Q: Why is top-posting such a bad thing?
Hi Briglia,
Quoted 11 lines · On Mon, May 02, 2011, [email protected] wrote:
This patch fixes a compilation warning regarding
btio/btio.ccompilation.--- btio/btio.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)btio/btio.c +0
-0
btio/btio.c static gboolean l2cap_get(int sock, GError **err, BtIOOption opt1, · line 806
Quoted 8 lines
btio/btio.c +1
-1@@ -800,7 +800,7 @@ static gboolean l2cap_get(int sock, GError **err, BtIOOption opt1,uint8_t dev_class[3 ];uint16_t handle;socklen_t len; -gboolean flushable; +gboolean flushable = TRUE; len =sizeof (l2o);memset (&l2o,0 , len);
I don't get the warning with my compiler, so in addition to the already requested compiler logs please also mention the compiler version. Also, the value should default to FALSE and not TRUE.
Johan
Quoted 20 lines · Johan Hedberg
Hi Briglia,
Quoted 17 lines · On Mon, May 02, 2011, [email protected] wrote:
This patch fixes a compilation warning regarding
btio/btio.ccompilation.
---btio/btio.c| 2 +-1 files changed, 1 insertions(+), 1 deletions(-)btio/btio.c +1
-1@@ -800,7 +800,7 @@ static gboolean l2cap_get(int sock, GError **err, BtIOOption opt1,uint8_t dev_class[3 ];uint16_t handle;socklen_t len; -gboolean flushable; +gboolean flushable = TRUE;
Quoted 6 lines
btio/btio.c static gboolean l2cap_get(int sock, GError **err, BtIOOption opt1, · line 806
Quoted 2 lines
btio/btio.c +0
-0len =sizeof (l2o);memset (&l2o,0 , len);I don't get the warning with my compiler, so in addition to the already requested compiler logs please also mention the compiler version. Also, the value should default to FALSE and not TRUE.
It looks like a false alarm from gcc 4.5.2 (Ubuntu Natty), or at least I feel like it (got it here, too). If you agree, a bug ticket could be submitted to them.
Hi all,
Quoted 30 lines · Elvis Pfützenreuter
Quoted 20 lines · Johan Hedberg
Hi Briglia,
Quoted 17 lines · On Mon, May 02, 2011, [email protected] wrote:
This patch fixes a compilation warning regarding
btio/btio.ccompilation.
---btio/btio.c| 2 +-1 files changed, 1 insertions(+), 1 deletions(-)btio/btio.c +1
-1@@ -800,7 +800,7 @@ static gboolean l2cap_get(int sock, GError **err, BtIOOption opt1, uint8_t dev_class[3]; uint16_t handle; socklen_t len; - gboolean flushable; + gboolean flushable = TRUE;Quoted 6 lines
btio/btio.c static gboolean l2cap_get(int sock, GError **err, BtIOOption opt1, · line 806
Quoted 2 lines
btio/btio.c +0
-0len = sizeof(l2o); memset(&l2o, 0, len);I don't get the warning with my compiler, so in addition to the already requested compiler logs please also mention the compiler version. Also, the value should default to FALSE and not TRUE.
Quoted 2 lines
It looks like a false alarm from gcc 4.5.2 (Ubuntu Natty), or at least I feel like it (got it here, too). If you agree, a bug ticket could be submitted to them.
It makes sense. This "fake" warning appears after I upgraded to Ubuntu Natty. Anyway, you guys could make a quick test adding --enable-maintainer-mode flag to configure.
Signature · 3 lines
INdT - Instituto Nokia de tecnologia +55 2126 1122 http://techblog.briglia.net
Hi Briglia,
Quoted 33 lines · Anderson Briglia
Hi all,
Quoted 30 lines · Elvis Pfützenreuter
Quoted 26 lines · Johan Hedberg
Hi Briglia,
Quoted 11 lines · On Mon, May 02, 2011, [email protected] wrote:
This patch fixes a compilation warning regarding
btio/btio.ccompilation.
---btio/btio.c| 2 +-1 files changed, 1 insertions(+), 1 deletions(-)btio/btio.c +0
-0btio/btio.c static gboolean l2cap_get(int sock, GError **err, BtIOOption opt1, · line 806
Quoted 8 lines
btio/btio.c +1
-1@@ -800,7 +800,7 @@ static gboolean l2cap_get(int sock, GError **err, BtIOOption opt1, uint8_t dev_class[3]; uint16_t handle; socklen_t len; - gboolean flushable; + gboolean flushable = TRUE; len = sizeof(l2o); memset(&l2o, 0, len);I don't get the warning with my compiler, so in addition to the already requested compiler logs please also mention the compiler version. Also, the value should default to FALSE and not TRUE.
Quoted 6 lines
Quoted 2 lines
It looks like a false alarm from gcc 4.5.2 (Ubuntu Natty), or at least I feel like it (got it here, too). If you agree, a bug ticket could be submitted to them.
It makes sense. This "fake" warning appears after I upgraded to Ubuntu Natty. Anyway, you guys could make a quick test adding --enable-maintainer-mode flag to configure.
We always have maintainer mode enabled and I can't see anything wrong here. It's probably your ubuntu.
Signature · 2 lines
Gustavo F. Padovan http://profusion.mobi
Hi,
Quoted 11 lines · On Mon, May 02, 2011, [email protected] wrote:
This patch fixes a compilation warning regarding
btio/btio.ccompilation.--- btio/btio.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)btio/btio.c +0
-0
btio/btio.c static gboolean l2cap_get(int sock, GError **err, BtIOOption opt1, · line 806
Quoted 8 lines
btio/btio.c +1
-1@@ -800,7 +800,7 @@ static gboolean l2cap_get(int sock, GError **err, BtIOOption opt1,uint8_t dev_class[3 ];uint16_t handle;socklen_t len; -gboolean flushable; +gboolean flushable = TRUE; len =sizeof (l2o);memset (&l2o,0 , len);
So are we going to get an updated patch for this (with the modifications that were requested)? It's quite clearly a false positive by the compiler (i.e. a compiler bug) but I still think that we should try to keep the BlueZ tree compilable with "./bootstrap-configure && make" for all major distributions.
Johan
Hi Johan,
Quoted 20 lines · Johan Hedberg
Hi,
Quoted 17 lines · On Mon, May 02, 2011, [email protected] wrote:
This patch fixes a compilation warning regarding
btio/btio.ccompilation.
---
btio/btio.c | 2 +-1 files changed, 1 insertions(+), 1 deletions(-)btio/btio.c +1
-1@@ -800,7 +800,7 @@ static gboolean l2cap_get(int sock, GError **err, BtIOOption opt1, uint8_t dev_class[3]; uint16_t handle; socklen_t len; - gboolean flushable; + gboolean flushable = TRUE;
Quoted 8 lines
btio/btio.c static gboolean l2cap_get(int sock, GError **err, BtIOOption opt1, · line 806
Quoted 2 lines
btio/btio.c +0
-0len = sizeof(l2o); memset(&l2o, 0, len);So are we going to get an updated patch for this (with the modifications that were requested)? It's quite clearly a false positive by the compiler (i.e. a compiler bug) but I still think that we should try to keep the BlueZ tree compilable with "./bootstrap-configure && make" for all major distributions.
Elvis is going to open a bug in Ubuntu bug system regarding this false positive. I believe it is worth to wait what Ubuntu developers will say.
Briglia
Quoted 3 lines
Johan
Signature · 3 lines
INdT - Instituto Nokia de tecnologia +55 2126 1122 http://techblog.briglia.net
Quoted 32 lines · Anderson Briglia
Hi Johan,
Quoted 20 lines · Johan Hedberg
Hi,
Quoted 17 lines · On Mon, May 02, 2011, [email protected] wrote:
This patch fixes a compilation warning regarding
btio/btio.ccompilation.--- btio/btio.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)btio/btio.c +1
-1@@ -800,7 +800,7 @@ static gboolean l2cap_get(int sock, GError **err, BtIOOption opt1,uint8_t dev_class[3 ];uint16_t handle;socklen_t len; -gboolean flushable; +gboolean flushable = TRUE;Quoted 8 lines
btio/btio.c static gboolean l2cap_get(int sock, GError **err, BtIOOption opt1, · line 806
Quoted 2 lines
btio/btio.c +0
-0len =sizeof (l2o);memset (&l2o,0 , len);So are we going to get an updated patch for this (with the modifications that were requested)? It's quite clearly a false positive by the compiler (i.e. a compiler bug) but I still think that we should try to keep the BlueZ tree compilable with "./bootstrap-configure && make" for all major distributions.
Quoted 3 lines
Elvis is going to open a bug in Ubuntu bug system regarding this false positive. I believe it is worth to wait what Ubuntu developers will say.
I have reported the bug yesterday
(https://bugs.launchpad.net/ubuntu/+source/gcc-defaults/+bug/776447),
but don't hold your breath while waiting for a response, you *will* die :)
Luiz Augusto von Dentz
maintainerHi,
Quoted 34 lines · Elvis Pfützenreuter
Quoted 32 lines · Anderson Briglia
Hi Johan,
Quoted 28 lines · Johan Hedberg
Hi,
Quoted 11 lines · On Mon, May 02, 2011, [email protected] wrote:
This patch fixes a compilation warning regarding
btio/btio.ccompilation.
---
btio/btio.c | 2 +-1 files changed, 1 insertions(+), 1 deletions(-)btio/btio.c +0
-0btio/btio.c static gboolean l2cap_get(int sock, GError **err, BtIOOption opt1, · line 806
Quoted 8 lines
btio/btio.c +1
-1@@ -800,7 +800,7 @@ static gboolean l2cap_get(int sock, GError **err, BtIOOption opt1, uint8_t dev_class[3]; uint16_t handle; socklen_t len; - gboolean flushable; + gboolean flushable = TRUE; len = sizeof(l2o); memset(&l2o, 0, len);So are we going to get an updated patch for this (with the modifications that were requested)? It's quite clearly a false positive by the compiler (i.e. a compiler bug) but I still think that we should try to keep the BlueZ tree compilable with "./bootstrap-configure && make" for all major distributions.
Quoted 3 lines
Quoted 3 lines
Elvis is going to open a bug in Ubuntu bug system regarding this false positive. I believe it is worth to wait what Ubuntu developers will say.
I don't see why it would be ubuntu specific, this seems to be some kind of regression/'feature' with gcc 4.5.
Signature · 2 lines
Luiz Augusto von Dentz Computer Engineer
Hi Luiz,
On 11:05 Thu 05 May, Luiz Augusto von Dentz wrote:
[snip]
Quoted 3 lines
I don't see why it would be ubuntu specific, this seems to be some kind of regression/'feature' with gcc 4.5.
Yeah, I really believe this is the case. I have gcc 4.5.2 here, that would be the version as in Natty, and I don't encounter that problem.
The only difference that I could find is that Ubuntu ships gcc with a .diff.gz of 1.3MB ;-)
But back to the topic at hand, I agree that the patch should be applied, Ubuntu is used by many developers and BlueZ should be kept clean of warnings.
Quoted 8 lines
Signature · 7 lines
-- Luiz Augusto von Dentz Computer Engineer -- To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Cheers,
Signature · 1 line
Vinicius
Luiz Augusto von Dentz
maintainerHi Vinicius,
Quoted 4 lines · Vinicius Costa Gomes
Hi Luiz,
On 11:05 Thu 05 May, Luiz Augusto von Dentz wrote:
Quoted 8 lines
[snip]
Quoted 3 lines
I don't see why it would be ubuntu specific, this seems to be some kind of regression/'feature' with gcc 4.5.
Yeah, I really believe this is the case. I have gcc 4.5.2 here, that would be the version as in Natty, and I don't encounter that problem.
So it seems to be Ubuntu specific in some way, very annoying way.
Quoted 6 lines
The only difference that I could find is that Ubuntu ships gcc with a .diff.gz of 1.3MB ;-)
But back to the topic at hand, I agree that the patch should be applied, Ubuntu is used by many developers and BlueZ should be kept clean of warnings.
Well if we don't get anywhere with the bug Elvis sent than that is the only think we can do, or maybe there is some new gcc flag that can prevent such behavior.
Signature · 2 lines
Luiz Augusto von Dentz Computer Engineer
Hi all,
Quoted 22 lines · Luiz Augusto von Dentz
Hi Vinicius,
Quoted 4 lines · Vinicius Costa Gomes
Hi Luiz,
On 11:05 Thu 05 May, Luiz Augusto von Dentz wrote:
Quoted 8 lines
[snip]
Quoted 3 lines
I don't see why it would be ubuntu specific, this seems to be some kind of regression/'feature' with gcc 4.5.
Yeah, I really believe this is the case. I have gcc 4.5.2 here, that would be the version as in Natty, and I don't encounter that problem.
So it seems to be Ubuntu specific in some way, very annoying way.
Quoted 3 lines
The only difference that I could find is that Ubuntu ships gcc with a .diff.gz of 1.3MB ;-)
Quoted 7 lines
Quoted 3 lines
But back to the topic at hand, I agree that the patch should be applied, Ubuntu is used by many developers and BlueZ should be kept clean of warnings.
Well if we don't get anywhere with the bug Elvis sent than that is the only think we can do, or maybe there is some new gcc flag that can prevent such behavior.
I'll resend the patch and you decide if it is worth to be applied or not.
Regards,
Briglia
Quoted 6 lines
--
Luiz Augusto von Dentz
Computer Engineer
Signature · 3 lines
INdT - Instituto Nokia de tecnologia +55 2126 1122 http://techblog.briglia.net
Quoted 13 lines · Vinicius Costa Gomes
Hi Luiz,
On 11:05 Thu 05 May, Luiz Augusto von Dentz wrote:
[snip]
Quoted 3 lines
I don't see why it would be ubuntu specific, this seems to be some kind of regression/'feature' with gcc 4.5.
Yeah, I really believe this is the case. I have gcc 4.5.2 here, that would be the version as in Natty, and I don't encounter that problem.
Quoted 6 lines
The only difference that I could find is that Ubuntu ships gcc with a .diff.gz of 1.3MB ;-)
But back to the topic at hand, I agree that the patch should be applied, Ubuntu is used by many developers and BlueZ should be kept clean of warnings.
It's also a bug in the GCC 4.6 shipped by Fedora 15, fwiw.
Cheers