From 9272943bc7e1058ae4564a94798e90925d01c16b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Wed, 29 Jun 2022 10:55:13 +0100 Subject: [PATCH] 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: --- subprojects/gst-devtools/meson.build | 1 - subprojects/gst-editing-services/meson.build | 1 - subprojects/gst-libav/meson.build | 1 - subprojects/gst-omx/meson.build | 1 - subprojects/gst-plugins-bad/meson.build | 1 - subprojects/gst-plugins-base/meson.build | 1 - subprojects/gst-plugins-good/meson.build | 1 - subprojects/gst-plugins-ugly/meson.build | 1 - subprojects/gst-rtsp-server/meson.build | 1 - subprojects/gstreamer/gst/gst.c | 5 ++--- subprojects/gstreamer/meson.build | 1 - 11 files changed, 2 insertions(+), 13 deletions(-) diff --git a/subprojects/gst-devtools/meson.build b/subprojects/gst-devtools/meson.build index fa8e8458d0..d789d25fb1 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 823f5a1b46..996bcf01ee 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 7da94b80d5..84ef846994 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 06147ad836..915538844a 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 cb5e573283..681bfe9b7b 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 d776e77199..267bb3cc61 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 97e0b97b79..9990f5e85a 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 bca09e34b5..15e5042617 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 f82e271e2f..7eee6936bc 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 01c03c6177..98456ecfac 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 dcdc8e5dfe..06e984679f 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', ]