Bug 105918 - [GTK] Disable deprecation warnings for GStaticRecMutex
Summary: [GTK] Disable deprecation warnings for GStaticRecMutex
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Trivial
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-02 04:38 PST by Alberto Garcia
Modified: 2013-01-07 10:36 PST (History)
5 users (show)

See Also:


Attachments
Patch (2.43 KB, patch)
2013-01-02 04:44 PST, Alberto Garcia
pnormand: review-
pnormand: commit-queue-
Details | Formatted Diff | Diff
Patch v2 (1.48 KB, patch)
2013-01-02 05:52 PST, Alberto Garcia
no flags Details | Formatted Diff | Diff
Patch v3 (1.52 KB, patch)
2013-01-07 09:53 PST, Alberto Garcia
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alberto Garcia 2013-01-02 04:38:34 PST
WebKitWebAudioSourceGStreamer uses a GStaticRecMutex, which is
deprecated since glib 2.32 in favor of GRecMutex, and hence produces a
compilation warning with -Wdeprecated-declarations.

../../Source/WebCore/platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp: In function ‘void webkit_web_audio_src_init(WebKitWebAudioSrc*)’:
../../Source/WebCore/platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp:193:5: warning: ‘void g_static_rec_mutex_init(GStaticRecMutex*)’ is deprecated (declared at /usr/local/devel/gnome3/include/glib-2.0/glib/deprecated/gthread.h:170): Use 'g_rec_mutex_init' instead [-Wdeprecated-declarations]
../../Source/WebCore/platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp:193:41: warning: ‘void g_static_rec_mutex_init(GStaticRecMutex*)’ is deprecated (declared at /usr/local/devel/gnome3/include/glib-2.0/glib/deprecated/gthread.h:170): Use 'g_rec_mutex_init' instead [-Wdeprecated-declarations]
../../Source/WebCore/platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp: In function ‘void webKitWebAudioSrcFinalize(GObject*)’:
../../Source/WebCore/platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp:266:5: warning: ‘void g_static_rec_mutex_free(GStaticRecMutex*)’ is deprecated (declared at /usr/local/devel/gnome3/include/glib-2.0/glib/deprecated/gthread.h:189): Use 'g_rec_mutex_free' instead [-Wdeprecated-declarations]
../../Source/WebCore/platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp:266:41: warning: ‘void g_static_rec_mutex_free(GStaticRecMutex*)’ is deprecated (declared at /usr/local/devel/gnome3/include/glib-2.0/glib/deprecated/gthread.h:189): Use 'g_rec_mutex_free' instead [-Wdeprecated-declarations]

However, we cannot change that since it's needed by
gst_task_set_lock() in GStreamer 0.10.

So we should disable the deprecation warning for those function calls.
Comment 1 Alberto Garcia 2013-01-02 04:44:16 PST
Created attachment 181025 [details]
Patch
Comment 2 Carlos Garcia Campos 2013-01-02 05:16:00 PST
Comment on attachment 181025 [details]
Patch

I think this is a lot of preprocessor code just to fix a compile warning that is harmless.
Comment 3 Alberto Garcia 2013-01-02 05:52:13 PST
Created attachment 181026 [details]
Patch v2

(In reply to comment #2)
> I think this is a lot of preprocessor code just to fix a compile
> warning that is harmless.

Here's a much simpler and readable version. The difference is that it
would disable the deprecation warnings in the whole file (which is
anyway less than 400 lines of code).
Comment 4 Philippe Normand 2013-01-07 06:48:46 PST
I don't think this patch is needed now that the webaudio backend is ported to gst 1.0
Comment 5 Alberto Garcia 2013-01-07 07:00:13 PST
(In reply to comment #4)
> I don't think this patch is needed now that the webaudio backend is ported to gst 1.0

I see, we could still keep it if we're using the old API, but I guess
it's not so important.

Feel free to close this bug then.
Comment 6 Philippe Normand 2013-01-07 07:12:38 PST
Comment on attachment 181025 [details]
Patch

Obsoleted by v2
Comment 7 Philippe Normand 2013-01-07 07:14:18 PST
Comment on attachment 181026 [details]
Patch v2

View in context: https://bugs.webkit.org/attachment.cgi?id=181026&action=review

> Source/WebCore/platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp:34
> +#if (COMPILER(GCC) && GCC_VERSION_AT_LEAST(4, 6, 0))

Alright maybe another condition can be added there? !defined(GST_API_VERSION_1)
So later on when we remove the 0.10 support we'll make sure to remove this code as well.
Comment 8 Alberto Garcia 2013-01-07 09:53:54 PST
Created attachment 181516 [details]
Patch v3
Comment 9 WebKit Review Bot 2013-01-07 10:35:57 PST
Comment on attachment 181516 [details]
Patch v3

Clearing flags on attachment: 181516

Committed r138960: <http://trac.webkit.org/changeset/138960>
Comment 10 WebKit Review Bot 2013-01-07 10:36:01 PST
All reviewed patches have been landed.  Closing bug.