From 791a068c58ddc42b87769ab1c66a2976eb632d4f Mon Sep 17 00:00:00 2001 From: Jordan Petridis Date: Tue, 4 Apr 2023 22:03:18 +0300 Subject: [PATCH] build: appease clang warning Clang complains about these variables being (possibly) unitialized, even when they are assigned to NULL or proper value inside the macro. Might as well initialize them to avoid the warning. Part-of: --- subprojects/gst-plugins-base/gst-libs/gst/video/video-frame.c | 2 +- subprojects/gstreamer/tests/check/gst/gstinfo.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/subprojects/gst-plugins-base/gst-libs/gst/video/video-frame.c b/subprojects/gst-plugins-base/gst-libs/gst/video/video-frame.c index bfb57e47e1..fdd1b89de0 100644 --- a/subprojects/gst-plugins-base/gst-libs/gst/video/video-frame.c +++ b/subprojects/gst-plugins-base/gst-libs/gst/video/video-frame.c @@ -39,7 +39,7 @@ video_frame_get_perf_category (void) static GstDebugCategory *cat = NULL; if (g_once_init_enter (&cat)) { - GstDebugCategory *c; + GstDebugCategory *c = NULL; GST_DEBUG_CATEGORY_GET (c, "GST_PERFORMANCE"); g_once_init_leave (&cat, c); diff --git a/subprojects/gstreamer/tests/check/gst/gstinfo.c b/subprojects/gstreamer/tests/check/gst/gstinfo.c index dba7d63cac..8615e4802a 100644 --- a/subprojects/gstreamer/tests/check/gst/gstinfo.c +++ b/subprojects/gstreamer/tests/check/gst/gstinfo.c @@ -516,8 +516,8 @@ GST_END_TEST; GST_START_TEST (info_set_and_reset_string) { - GstDebugCategory *states; - GstDebugCategory *caps; + GstDebugCategory *states = NULL; + GstDebugCategory *caps = NULL; GstDebugLevel cat; GST_DEBUG_CATEGORY_GET (states, "GST_STATES");