mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-20 23:36:38 +00:00
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
This commit is contained in:
parent
b680671374
commit
13643870bf
1 changed files with 3 additions and 0 deletions
|
@ -1340,6 +1340,9 @@ gst_video_scaler_vertical (GstVideoScaler * scale, GstVideoFormat format,
|
|||
func = video_scale_v_ntap_u16;
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
g_return_if_reached ();
|
||||
func = NULL;
|
||||
}
|
||||
|
||||
if (scale->tmpwidth < width)
|
||||
|
|
Loading…
Reference in a new issue