From: Tim-Philipp Müller Date: Wed, 29 Jun 2022 09:55:13 +0000 (+0100) Subject: coding style: allow declarations after statement X-Git-Tag: 1.22.0~1360 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9272943bc7e1058ae4564a94798e90925d01c16b;p=platform%2Fupstream%2Fgstreamer.git coding style: allow declarations after statement See https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1243/ and https://gitlab.freedesktop.org/gstreamer/gstreamer-project/-/issues/78 Part-of: --- diff --git a/subprojects/gst-devtools/meson.build b/subprojects/gst-devtools/meson.build index fa8e845..d789d25 100644 --- a/subprojects/gst-devtools/meson.build +++ b/subprojects/gst-devtools/meson.build @@ -131,7 +131,6 @@ warning_flags = [ '-Wmissing-include-dirs', '-Waddress', '-Wno-multichar', - '-Wdeclaration-after-statement', '-Wvla', '-Wpointer-arith', ] diff --git a/subprojects/gst-editing-services/meson.build b/subprojects/gst-editing-services/meson.build index 823f5a1..996bcf0 100644 --- a/subprojects/gst-editing-services/meson.build +++ b/subprojects/gst-editing-services/meson.build @@ -251,7 +251,6 @@ warning_flags = [ '-Wmissing-include-dirs', '-Waddress', '-Wno-multichar', - '-Wdeclaration-after-statement', '-Wvla', '-Wpointer-arith', ] diff --git a/subprojects/gst-libav/meson.build b/subprojects/gst-libav/meson.build index 7da94b8..84ef846 100644 --- a/subprojects/gst-libav/meson.build +++ b/subprojects/gst-libav/meson.build @@ -193,7 +193,6 @@ warning_flags = [ '-Waddress', '-Wno-multichar', '-Waggregate-return', - '-Wdeclaration-after-statement', '-Wvla', '-Wpointer-arith', ] diff --git a/subprojects/gst-omx/meson.build b/subprojects/gst-omx/meson.build index 06147ad..9155388 100644 --- a/subprojects/gst-omx/meson.build +++ b/subprojects/gst-omx/meson.build @@ -346,7 +346,6 @@ warning_flags = [ warning_c_flags = [ '-Wmissing-prototypes', - '-Wdeclaration-after-statement', '-Wold-style-definition', '-Waggregate-return', ] diff --git a/subprojects/gst-plugins-bad/meson.build b/subprojects/gst-plugins-bad/meson.build index cb5e573..681bfe9 100644 --- a/subprojects/gst-plugins-bad/meson.build +++ b/subprojects/gst-plugins-bad/meson.build @@ -235,7 +235,6 @@ warning_flags = [ warning_c_flags = [ '-Wmissing-prototypes', - '-Wdeclaration-after-statement', '-Wold-style-definition', ] diff --git a/subprojects/gst-plugins-base/meson.build b/subprojects/gst-plugins-base/meson.build index d776e77..267bb3c 100644 --- a/subprojects/gst-plugins-base/meson.build +++ b/subprojects/gst-plugins-base/meson.build @@ -251,7 +251,6 @@ warning_flags = [ warning_c_flags = [ '-Wmissing-prototypes', - '-Wdeclaration-after-statement', ] warning_cxx_flags = [ diff --git a/subprojects/gst-plugins-good/meson.build b/subprojects/gst-plugins-good/meson.build index 97e0b97..9990f5e 100644 --- a/subprojects/gst-plugins-good/meson.build +++ b/subprojects/gst-plugins-good/meson.build @@ -229,7 +229,6 @@ warning_flags = [ warning_c_flags = [ '-Wmissing-prototypes', - '-Wdeclaration-after-statement', '-Wold-style-definition', '-Waggregate-return', ] diff --git a/subprojects/gst-plugins-ugly/meson.build b/subprojects/gst-plugins-ugly/meson.build index bca09e3..15e5042 100644 --- a/subprojects/gst-plugins-ugly/meson.build +++ b/subprojects/gst-plugins-ugly/meson.build @@ -242,7 +242,6 @@ warning_flags = [ warning_c_flags = [ '-Wmissing-prototypes', '-Wold-style-definition', - '-Wdeclaration-after-statement', '-Wnested-externs' ] diff --git a/subprojects/gst-rtsp-server/meson.build b/subprojects/gst-rtsp-server/meson.build index f82e271..7eee6936 100644 --- a/subprojects/gst-rtsp-server/meson.build +++ b/subprojects/gst-rtsp-server/meson.build @@ -126,7 +126,6 @@ warning_flags = [ '-Wmissing-include-dirs', '-Waddress', '-Wno-multichar', - '-Wdeclaration-after-statement', '-Wvla', '-Wpointer-arith', ] diff --git a/subprojects/gstreamer/gst/gst.c b/subprojects/gstreamer/gst/gst.c index 01c03c6..98456ec 100644 --- a/subprojects/gstreamer/gst/gst.c +++ b/subprojects/gstreamer/gst/gst.c @@ -1092,7 +1092,6 @@ void gst_deinit (void) { GstBinClass *bin_class; - GstClock *clock; g_mutex_lock (&init_lock); @@ -1129,9 +1128,9 @@ gst_deinit (void) _gst_executable_path = NULL; } - clock = gst_system_clock_obtain (); - gst_object_unref (clock); + GstClock *clock = gst_system_clock_obtain (); gst_object_unref (clock); + gst_clear_object (&clock); _priv_gst_registry_cleanup (); _priv_gst_allocator_cleanup (); diff --git a/subprojects/gstreamer/meson.build b/subprojects/gstreamer/meson.build index dcdc8e5..06e9846 100644 --- a/subprojects/gstreamer/meson.build +++ b/subprojects/gstreamer/meson.build @@ -492,7 +492,6 @@ warning_flags = [ '-Waddress', '-Waggregate-return', '-Wno-multichar', - '-Wdeclaration-after-statement', '-Wvla', '-Wpointer-arith', ]