[Spice-devel,client,08/10] session: Disable the spice_audio_new() deprecation warning

Submitted by Francois Gouget on Oct. 18, 2016, 5:47 p.m.

Details

Message ID 26e4b94fce438beac72398fb52c9a49e81dc65c9.1476810638.git.fgouget@free.fr
State New
Headers show
Series "Deprecation warning cleanup" ( rev: 1 ) in Spice

Not browsing as part of any series.

Commit Message

Francois Gouget Oct. 18, 2016, 5:47 p.m.
Third parties are not supposed to use spice_audio_new() anymore, but
internally it is used to implement its replacement, spice_audio_get().

Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
---
 src/spice-session.c | 2 ++
 1 file changed, 2 insertions(+)

Patch hide | download patch | download mbox

diff --git a/src/spice-session.c b/src/spice-session.c
index 238b5cb..7d7d7a9 100644
--- a/src/spice-session.c
+++ b/src/spice-session.c
@@ -2641,7 +2641,9 @@  SpiceAudio *spice_audio_get(SpiceSession *session, GMainContext *context)
     g_mutex_lock(&mutex);
     self = session->priv->audio_manager;
     if (self == NULL) {
+        G_GNUC_BEGIN_IGNORE_DEPRECATIONS
         self = spice_audio_new(session, context, NULL);
+        G_GNUC_END_IGNORE_DEPRECATIONS
         session->priv->audio_manager = self;
     }
     g_mutex_unlock(&mutex);

Comments

Hi,

On Tue, Oct 18, 2016 at 07:47:12PM +0200, Francois Gouget wrote:
> Third parties are not supposed to use spice_audio_new() anymore, but
> internally it is used to implement its replacement, spice_audio_get().
>
> Signed-off-by: Francois Gouget <fgouget@codeweavers.com>

This was deprecated in 2011, I think is safe to remove it from public
header.

> ---
>  src/spice-session.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/src/spice-session.c b/src/spice-session.c
> index 238b5cb..7d7d7a9 100644
> --- a/src/spice-session.c
> +++ b/src/spice-session.c
> @@ -2641,7 +2641,9 @@ SpiceAudio *spice_audio_get(SpiceSession *session, GMainContext *context)
>      g_mutex_lock(&mutex);
>      self = session->priv->audio_manager;
>      if (self == NULL) {
> +        G_GNUC_BEGIN_IGNORE_DEPRECATIONS
>          self = spice_audio_new(session, context, NULL);
> +        G_GNUC_END_IGNORE_DEPRECATIONS
>          session->priv->audio_manager = self;
>      }
>      g_mutex_unlock(&mutex);
> -- 
> 2.9.3
> 
> _______________________________________________
> Spice-devel mailing list
> Spice-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/spice-devel