GNOME Bugzilla – Bug 789983
gstdevicemonitor: Avoid maybe-uninitialized error
Last modified: 2017-12-04 10:58:43 UTC
Created attachment 363075 [details] [review] [PATCH] gstdevicemonitor: Avoid maybe-uninitialized error On Arch Linux x86_64, gcc 7.2.0-3, -Og -g3: gstdevicemonitor.c: In function ‘bus_sync_message’: gstdevicemonitor.c:276:8: error: ‘matches’ may be used uninitialized in this function [-Werror=maybe-uninitialized] This commit also simplifies the code a bit. I gave up on attempting to compile without --disable-fatal-warnings after encountering way too many of them in gst-plugins-good.
Thanks, pushed with modifications - I wasn't entirely convinced that inverting the hidden check makes the code clearer. Hope you don't mind :) commit d9b20492f328cd89b618de00374e6999ddf45876 (HEAD -> master) Author: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com> Date: Mon Nov 6 20:23:12 2017 +0100 devicemonitor: Avoid maybe-uninitialized compiler warning On Arch Linux x86_64, gcc 7.2.0-3, -Og -g3: gstdevicemonitor.c: In function ‘bus_sync_message’: gstdevicemonitor.c:276:8: error: ‘matches’ may be used uninitialized in this function [-Werror=maybe-uninitialized] This commit also simplifies the code a bit. https://bugzilla.gnome.org/show_bug.cgi?id=789983