---
This mimics the case above, fate is happy.
Silences a long warning like
~/src/libav/libavcodec/vc1dec.c:1868:28: warning: variable 'px' is used
uninitialized
whenever 'if' condition is false [-Wsometimes-uninitialized]
} else if (c_valid) {
^~~~~~~
~/src/libav/libavcodec/vc1dec.c:1881:70: note: uninitialized use occurs here
s->mv[dir][n][0] = s->current_picture.motion_val[dir][xy][0] = ((px + dmv_x
+ r_x) & ((r_x ...
^~
~/src/libav/libavcodec/vc1dec.c:1868:24: note: remove the 'if' if its condition
is always
true
} else if (c_valid) {
^~~~~~~~~~~~~
~/src/libav/libavcodec/vc1dec.c:1680:11: note: initialize the variable 'px' to
silence
this warning
int px, py;
^
= 0
~/src/libav/libavcodec/vc1dec.c:1868:28: warning: variable 'py' is used
uninitialized
whenever 'if' condition is false [-Wsometimes-uninitialized]
} else if (c_valid) {
^~~~~~~
~/src/libav/libavcodec/vc1dec.c:1882:70: note: uninitialized use occurs here
s->mv[dir][n][1] = s->current_picture.motion_val[dir][xy][1] = ((py + dmv_y
+ r_y) & ((r_y ...
^~
~/src/libav/libavcodec/vc1dec.c:1868:24: note: remove the 'if' if its condition
is always
true
} else if (c_valid) {
^~~~~~~~~~~~~
~/src/libav/libavcodec/vc1dec.c:1680:15: note: initialize the variable 'py' to
silence
this warning
int px, py;
^
= 0
Vittorio
libavcodec/vc1dec.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/libavcodec/vc1dec.c b/libavcodec/vc1dec.c
index bcc0e4f..5d3ed80 100644
--- a/libavcodec/vc1dec.c
+++ b/libavcodec/vc1dec.c
@@ -1868,7 +1868,8 @@ static inline void vc1_pred_mv_intfr(VC1Context *v, int
n, int dmv_x, int dmv_y,
} else if (c_valid) {
px = C[0];
py = C[1];
- }
+ } else
+ px = py = 0;
}
} else if (total_valid == 1) {
px = (a_valid) ? A[0] : ((b_valid) ? B[0] : C[0]);
--
1.8.3.4 (Apple Git-47)
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel