Bug 577207 vp8 warning: empty body in an if-statement. r=derf a=bsmedberg

This commit is contained in:
timeless@mozdev.org 2010-07-23 13:58:15 +12:00
parent da0e88e971
commit 1181073397
3 changed files with 38 additions and 4 deletions

View File

@ -0,0 +1,32 @@
diff --git a/media/libvpx/vp8/decoder/decodemv.c b/media/libvpx/vp8/decoder/decodemv.c
--- a/media/libvpx/vp8/decoder/decodemv.c
+++ b/media/libvpx/vp8/decoder/decodemv.c
@@ -222,23 +222,24 @@ void vp8_decode_mode_mvs(VP8D_COMP *pbi)
{
B_MODE_INFO *const bmi = mbmi->partition_bmi + j;
MV *const mv = & bmi->mv.as_mv;
int k = -1; /* first block in subset j */
int mv_contz;
while (j != L[++k])
+ {
+#if CONFIG_DEBUG
if (k >= 16)
-#if CONFIG_DEBUG
+ {
assert(0);
-
-#else
- ;
+ }
#endif
+ }
mv_contz = vp8_mv_cont(&(vp8_left_bmi(mi, k)->mv.as_mv), &(vp8_above_bmi(mi, k, mis)->mv.as_mv));
switch (bmi->mode = (B_PREDICTION_MODE) sub_mv_ref(bc, vp8_sub_mv_ref_prob2 [mv_contz])) //pc->fc.sub_mv_ref_prob))
{
case NEW4X4:
read_mv(bc, mv, (const MV_CONTEXT *) mvc);
mv->row += best_mv.row;

View File

@ -245,3 +245,4 @@ patch -p3 < splitmv-bounds.patch
patch -p3 < subpixel-qword.patch
# Patch to make asm globals symbol hidden so linking succeeds on x86-64.
patch -p3 < subpixel-hidden.patch
patch -p3 < emptyif_warning.patch

View File

@ -227,13 +227,14 @@ void vp8_decode_mode_mvs(VP8D_COMP *pbi)
int mv_contz;
while (j != L[++k])
if (k >= 16)
{
#if CONFIG_DEBUG
if (k >= 16)
{
assert(0);
#else
;
}
#endif
}
mv_contz = vp8_mv_cont(&(vp8_left_bmi(mi, k)->mv.as_mv), &(vp8_above_bmi(mi, k, mis)->mv.as_mv));