All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Solve compilation warning usin gcc 4.5.0
@ 2010-08-11  9:09 Jose Antonio Santos Cadenas
  2010-08-11 12:49 ` Johan Hedberg
  0 siblings, 1 reply; 7+ messages in thread
From: Jose Antonio Santos Cadenas @ 2010-08-11  9:09 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Jose Antonio Santos Cadenas

---
 audio/control.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/audio/control.c b/audio/control.c
index c8aba53..daa01ef 100644
--- a/audio/control.c
+++ b/audio/control.c
@@ -446,7 +446,7 @@ static void avctp_set_state(struct control *control, avctp_state_t new_state)
 
 		avctp_disconnected(control->dev);
 
-		if (old_state != AVCTP_STATE_CONNECTED)
+		if (old_state != AVDTP_SESSION_STATE_CONNECTED)
 			break;
 
 		value = FALSE;
-- 
1.7.2


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

* Re: [PATCH] Solve compilation warning usin gcc 4.5.0
  2010-08-11  9:09 [PATCH] Solve compilation warning usin gcc 4.5.0 Jose Antonio Santos Cadenas
@ 2010-08-11 12:49 ` Johan Hedberg
  2010-08-11 12:55   ` José Antonio Santos Cadenas
  2010-08-11 13:17   ` José Antonio Santos Cadenas
  0 siblings, 2 replies; 7+ messages in thread
From: Johan Hedberg @ 2010-08-11 12:49 UTC (permalink / raw)
  To: Jose Antonio Santos Cadenas; +Cc: linux-bluetooth

Hi,

On Wed, Aug 11, 2010, Jose Antonio Santos Cadenas wrote:
> ---
>  audio/control.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/audio/control.c b/audio/control.c
> index c8aba53..daa01ef 100644
> --- a/audio/control.c
> +++ b/audio/control.c
> @@ -446,7 +446,7 @@ static void avctp_set_state(struct control *control, avctp_state_t new_state)
>  
>  		avctp_disconnected(control->dev);
>  
> -		if (old_state != AVCTP_STATE_CONNECTED)
> +		if (old_state != AVDTP_SESSION_STATE_CONNECTED)
>  			break;
>  
>  		value = FALSE;

That's the wrong fix to suppress the warning. The real problem is in the
beginning of the function:

	avdtp_session_state_t old_state = control->state;

Obviously that should be avctp_state_t and not avdtp. Do you
want to send another patch to fix it?

Johan

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

* Re: [PATCH] Solve compilation warning usin gcc 4.5.0
  2010-08-11 12:49 ` Johan Hedberg
@ 2010-08-11 12:55   ` José Antonio Santos Cadenas
  2010-08-11 13:06     ` Jose Antonio Santos Cadenas
  2010-08-11 13:17   ` José Antonio Santos Cadenas
  1 sibling, 1 reply; 7+ messages in thread
From: José Antonio Santos Cadenas @ 2010-08-11 12:55 UTC (permalink / raw)
  To: Johan Hedberg; +Cc: linux-bluetooth

El Wednesday 11 August 2010 14:49:42 Johan Hedberg escribió:
> Hi,
> 
> On Wed, Aug 11, 2010, Jose Antonio Santos Cadenas wrote:
> > ---
> > 
> >  audio/control.c |    2 +-
> >  1 files changed, 1 insertions(+), 1 deletions(-)
> > 
> > diff --git a/audio/control.c b/audio/control.c
> > index c8aba53..daa01ef 100644
> > --- a/audio/control.c
> > +++ b/audio/control.c
> > @@ -446,7 +446,7 @@ static void avctp_set_state(struct control *control,
> > avctp_state_t new_state)
> > 
> >  		avctp_disconnected(control->dev);
> > 
> > -		if (old_state != AVCTP_STATE_CONNECTED)
> > +		if (old_state != AVDTP_SESSION_STATE_CONNECTED)
> > 
> >  			break;
> >  		
> >  		value = FALSE;
> 
> That's the wrong fix to suppress the warning. The real problem is in the
> beginning of the function:
> 
> 	avdtp_session_state_t old_state = control->state;
> 
> Obviously that should be avctp_state_t and not avdtp. Do you
> want to send another patch to fix it?

Sure.
> 
> Johan

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

* [PATCH] Solve compilation warning usin gcc 4.5.0
  2010-08-11 12:55   ` José Antonio Santos Cadenas
@ 2010-08-11 13:06     ` Jose Antonio Santos Cadenas
  2010-08-11 13:17       ` Johan Hedberg
  0 siblings, 1 reply; 7+ messages in thread
From: Jose Antonio Santos Cadenas @ 2010-08-11 13:06 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Jose Antonio Santos Cadenas

---
 audio/control.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/audio/control.c b/audio/control.c
index c8aba53..24db448 100644
--- a/audio/control.c
+++ b/audio/control.c
@@ -437,7 +437,7 @@ static void avctp_set_state(struct control *control, avctp_state_t new_state)
 {
 	GSList *l;
 	struct audio_device *dev = control->dev;
-	avdtp_session_state_t old_state = control->state;
+	avctp_state_t old_state = control->state;
 	gboolean value;
 
 	switch (new_state) {
-- 
1.7.2


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

* Re: [PATCH] Solve compilation warning usin gcc 4.5.0
  2010-08-11 12:49 ` Johan Hedberg
  2010-08-11 12:55   ` José Antonio Santos Cadenas
@ 2010-08-11 13:17   ` José Antonio Santos Cadenas
  2010-08-11 13:40     ` Marcel Holtmann
  1 sibling, 1 reply; 7+ messages in thread
From: José Antonio Santos Cadenas @ 2010-08-11 13:17 UTC (permalink / raw)
  To: Johan Hedberg; +Cc: linux-bluetooth

El Wednesday 11 August 2010 14:49:42 Johan Hedberg escribió:
> Hi,
> 
> On Wed, Aug 11, 2010, Jose Antonio Santos Cadenas wrote:
> > ---
> > 
> >  audio/control.c |    2 +-
> >  1 files changed, 1 insertions(+), 1 deletions(-)
> > 
> > diff --git a/audio/control.c b/audio/control.c
> > index c8aba53..daa01ef 100644
> > --- a/audio/control.c
> > +++ b/audio/control.c
> > @@ -446,7 +446,7 @@ static void avctp_set_state(struct control *control,
> > avctp_state_t new_state)
> > 
> >  		avctp_disconnected(control->dev);
> > 
> > -		if (old_state != AVCTP_STATE_CONNECTED)
> > +		if (old_state != AVDTP_SESSION_STATE_CONNECTED)
> > 
> >  			break;
> >  		
> >  		value = FALSE;
> 
> That's the wrong fix to suppress the warning. The real problem is in the
> beginning of the function:
> 
> 	avdtp_session_state_t old_state = control->state;
> 
> Obviously that should be avctp_state_t and not avdtp. Do you
> want to send another patch to fix it?
> 
> Johan

I have also experienced more warnings, but I don't know what's the best way to 
solve it because they are related to gstreamer and I'm not familiar with it. I 
attach them in case anyone can solve them or help me showing the best way to 
solve do it.

  CC     audio/audio_libgstbluetooth_la-gstsbcenc.lo
audio/gstsbcenc.c:138:1: warning: no previous declaration for 
'gst_sbc_enc_get_type'
  CC     audio/audio_libgstbluetooth_la-gstsbcdec.lo
audio/gstsbcdec.c:37:1: warning: no previous declaration for 
'gst_sbc_dec_get_type'
  CC     audio/audio_libgstbluetooth_la-gstsbcparse.lo
audio/gstsbcparse.c:37:1: warning: no previous declaration for 
'gst_sbc_parse_get_type'
  CC     audio/audio_libgstbluetooth_la-gstavdtpsink.lo
audio/gstavdtpsink.c:82:1: warning: no previous declaration for 
'gst_avdtp_sink_get_type'
  CC     audio/audio_libgstbluetooth_la-gsta2dpsink.lo
audio/gsta2dpsink.c:50:1: warning: no previous declaration for 
'gst_a2dp_sink_get_type'
  CC     audio/audio_libgstbluetooth_la-gstsbcutil.lo
  CC     audio/audio_libgstbluetooth_la-gstrtpsbcpay.lo
audio/gstrtpsbcpay.c:70:1: warning: no previous declaration for 
'gst_rtp_sbc_pay_get_type'
  CC     audio/audio_libgstbluetooth_la-ipc.lo


Looking to the code, the problem seems to be in this macro:
GST_BOILERPLATE

http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-
GstUtils.html#GST-BOILERPLATE:CAPS

As I said I don't have previous experience with gstreamer and I don't know if 
it is a good idea to declare the "get_type" function previously.


Regards.

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

* Re: [PATCH] Solve compilation warning usin gcc 4.5.0
  2010-08-11 13:06     ` Jose Antonio Santos Cadenas
@ 2010-08-11 13:17       ` Johan Hedberg
  0 siblings, 0 replies; 7+ messages in thread
From: Johan Hedberg @ 2010-08-11 13:17 UTC (permalink / raw)
  To: Jose Antonio Santos Cadenas; +Cc: linux-bluetooth

Hi,

On Wed, Aug 11, 2010, Jose Antonio Santos Cadenas wrote:
> ---
>  audio/control.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/audio/control.c b/audio/control.c
> index c8aba53..24db448 100644
> --- a/audio/control.c
> +++ b/audio/control.c
> @@ -437,7 +437,7 @@ static void avctp_set_state(struct control *control, avctp_state_t new_state)
>  {
>  	GSList *l;
>  	struct audio_device *dev = control->dev;
> -	avdtp_session_state_t old_state = control->state;
> +	avctp_state_t old_state = control->state;
>  	gboolean value;
>  
>  	switch (new_state) {

Thanks. The patch is now upstream.

Johan

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

* Re: [PATCH] Solve compilation warning usin gcc 4.5.0
  2010-08-11 13:17   ` José Antonio Santos Cadenas
@ 2010-08-11 13:40     ` Marcel Holtmann
  0 siblings, 0 replies; 7+ messages in thread
From: Marcel Holtmann @ 2010-08-11 13:40 UTC (permalink / raw)
  To: José Antonio Santos Cadenas; +Cc: Johan Hedberg, linux-bluetooth

Hi Jose,

> I have also experienced more warnings, but I don't know what's the best way to 
> solve it because they are related to gstreamer and I'm not familiar with it. I 
> attach them in case anyone can solve them or help me showing the best way to 
> solve do it.
> 
>   CC     audio/audio_libgstbluetooth_la-gstsbcenc.lo
> audio/gstsbcenc.c:138:1: warning: no previous declaration for 
> 'gst_sbc_enc_get_type'
>   CC     audio/audio_libgstbluetooth_la-gstsbcdec.lo
> audio/gstsbcdec.c:37:1: warning: no previous declaration for 
> 'gst_sbc_dec_get_type'
>   CC     audio/audio_libgstbluetooth_la-gstsbcparse.lo
> audio/gstsbcparse.c:37:1: warning: no previous declaration for 
> 'gst_sbc_parse_get_type'
>   CC     audio/audio_libgstbluetooth_la-gstavdtpsink.lo
> audio/gstavdtpsink.c:82:1: warning: no previous declaration for 
> 'gst_avdtp_sink_get_type'
>   CC     audio/audio_libgstbluetooth_la-gsta2dpsink.lo
> audio/gsta2dpsink.c:50:1: warning: no previous declaration for 
> 'gst_a2dp_sink_get_type'
>   CC     audio/audio_libgstbluetooth_la-gstsbcutil.lo
>   CC     audio/audio_libgstbluetooth_la-gstrtpsbcpay.lo
> audio/gstrtpsbcpay.c:70:1: warning: no previous declaration for 
> 'gst_rtp_sbc_pay_get_type'
>   CC     audio/audio_libgstbluetooth_la-ipc.lo
> 
> 
> Looking to the code, the problem seems to be in this macro:
> GST_BOILERPLATE
> 
> http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-
> GstUtils.html#GST-BOILERPLATE:CAPS
> 
> As I said I don't have previous experience with gstreamer and I don't know if 
> it is a good idea to declare the "get_type" function previously.

this is GStreamer type generation being utterly stupid. Either way
around it will produce a warning. It added #pragma magic to keep the
warning, but not failing the build. However we might need to turn around
and change that the warning only shows up with old compilers.

Regards

Marcel



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

end of thread, other threads:[~2010-08-11 13:40 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-11  9:09 [PATCH] Solve compilation warning usin gcc 4.5.0 Jose Antonio Santos Cadenas
2010-08-11 12:49 ` Johan Hedberg
2010-08-11 12:55   ` José Antonio Santos Cadenas
2010-08-11 13:06     ` Jose Antonio Santos Cadenas
2010-08-11 13:17       ` Johan Hedberg
2010-08-11 13:17   ` José Antonio Santos Cadenas
2010-08-11 13:40     ` Marcel Holtmann

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.