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:
Edward Hervey 2014-05-22 16:13:31 +02:00
parent 1a2f4a3cd3
commit ebde58f1d1

View file

@ -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 '!'");