GNOME Bugzilla – Bug 754214
unused variable warnings
Last modified: 2015-08-28 07:11:39 UTC
Some variables are used only in assert statements and cause compile warnings when NDEBUG is given. sprinkle.c:212:12: error: variable ‘linked’ set but not used [-Werror=unused-but-set-variable] sprinkle3.c:244:12: error: variable ‘res’ set but not used [-Werror=unused-but-set-variable] sprinkle2.c:231:12: error: variable ‘res’ set but not used [-Werror=unused-but-set-variable] test-overlay-blending.c:94:20: error: variable ‘decomp_res’ set but not used [-Werror=unused-but-set-variable]
Created attachment 310147 [details] [review] suggested patch Suggested patch.
Hi.. please refer to https://bugzilla.gnome.org/show_bug.cgi?id=752604 As per comments from Tim, if --disable-gst-debug is used, you should also use --disable-fatal-warnings.
Thank you for your guide. Yes, I got these errors while trying to enable fatal warnings option on product mode. Do you know why gstreamer uses it only in debug mode? (In reply to Vineeth from comment #2) > Hi.. > please refer to https://bugzilla.gnome.org/show_bug.cgi?id=752604 > > As per comments from Tim, > if --disable-gst-debug is used, you should also use --disable-fatal-warnings.
Releases are built without assertions, that's why these variables are now considered unused. The g_assert() that uses them is a noop in releases (and current GIT master has a release version number: 1.5.90, and not a GIT version number 1.5.90.1). For debug output, it's basically the same story. Adding noise to the code for making these unused variable compiler warnings disappear when debugging (or assertions) are disabled is not worth it and will only make the code less readable. -Werror is only supposed to be used for builds from GIT with debug output and assertions enabled.