Skip to content
  • Sebastian Dröge's avatar
    video-scaler: Guard against (impossible) bits!=16 && bits!=8 case to fix... · 13643870
    Sebastian Dröge authored
    video-scaler: Guard against (impossible) bits!=16 && bits!=8 case to fix compiler warning with clang
    
    video-scaler.c:1331:14: error: variable 'func' is used uninitialized whenever 'if' condition is false
          [-Werror,-Wsometimes-uninitialized]
      } else if (bits == 16) {
                 ^~~~~~~~~~
    video-scaler.c:1348:3: note: uninitialized use occurs here
      func (scale, src_lines, dest, dest_offset, width, n_elems);
      ^~~~
    video-scaler.c:1331:10: note: remove the 'if' if its condition is always true
      } else if (bits == 16) {
             ^~~~~~~~~~~~~~~~
    video-scaler.c:1260:27: note: initialize the variable 'func' to silence this warning
      GstVideoScalerVFunc func;
                              ^
                               = NULL
    13643870