mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-10 03:19:40 +00:00
validate-utils: Fix unitialized variable
gst-validate-utils.c:413:7: error: variable 'v0' is used uninitialized whenever 'if' condition is true [-Werror,-Wsometimes-uninitialized] if (c == '!') { ^~~~~~~~ gst-validate-utils.c:424:10: note: uninitialized use occurs here return v0; ^~ gst-validate-utils.c:413:3: note: remove the 'if' if its condition is always false if (c == '!') { ^~~~~~~~~~~~~~~ gst-validate-utils.c:411:13: note: initialize the variable 'v0' to silence this warning gdouble v0; ^ = 0.0 1
This commit is contained in:
parent
1a2f4a3cd3
commit
ebde58f1d1
1 changed files with 2 additions and 1 deletions
|
@ -408,7 +408,8 @@ static gdouble
|
|||
_read_unary (MathParser * parser)
|
||||
{
|
||||
gchar c;
|
||||
gdouble v0;
|
||||
gdouble v0 = 0.0;
|
||||
|
||||
c = _peek (parser);
|
||||
if (c == '!') {
|
||||
_error (parser, "Expected '+' or '-' for unary expression, got '!'");
|
||||
|
|
Loading…
Reference in a new issue