From 178db94cd60d613f11b4f571399f238d7b5649e7 Mon Sep 17 00:00:00 2001
From: James Zern <jzern@google.com>
Date: Thu, 12 Dec 2013 19:44:08 -0800
Subject: [PATCH] vp9 asserts: fix compile warning

string literal to int within an assert

Change-Id: I0c889256b67a078e6e2a79577f0b7ae084243258
---
 vp9/common/vp9_entropy.h      | 2 +-
 vp9/common/vp9_pred_common.h  | 4 ++--
 vp9/decoder/vp9_decodeframe.c | 4 ++--
 vp9/decoder/vp9_decodemv.c    | 2 +-
 vp9/encoder/vp9_encodemb.c    | 2 +-
 vp9/encoder/vp9_rdopt.c       | 6 +++---
 vp9/vp9_cx_iface.c            | 2 +-
 7 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/vp9/common/vp9_entropy.h b/vp9/common/vp9_entropy.h
index 721917f051..65b679ad2e 100644
--- a/vp9/common/vp9_entropy.h
+++ b/vp9/common/vp9_entropy.h
@@ -166,7 +166,7 @@ static int get_entropy_context(TX_SIZE tx_size, const ENTROPY_CONTEXT *a,
       left_ec  = !!*(const uint64_t *)l;
       break;
     default:
-      assert(!"Invalid transform size.");
+      assert(0 && "Invalid transform size.");
   }
 
   return combine_entropy_contexts(above_ec, left_ec);
diff --git a/vp9/common/vp9_pred_common.h b/vp9/common/vp9_pred_common.h
index 66cd15143a..23722ba72d 100644
--- a/vp9/common/vp9_pred_common.h
+++ b/vp9/common/vp9_pred_common.h
@@ -104,7 +104,7 @@ static const vp9_prob *get_tx_probs(TX_SIZE max_tx_size, int ctx,
     case TX_32X32:
       return tx_probs->p32x32[ctx];
     default:
-      assert(!"Invalid max_tx_size.");
+      assert(0 && "Invalid max_tx_size.");
       return NULL;
   }
 }
@@ -124,7 +124,7 @@ static unsigned int *get_tx_counts(TX_SIZE max_tx_size, int ctx,
     case TX_32X32:
       return tx_counts->p32x32[ctx];
     default:
-      assert(!"Invalid max_tx_size.");
+      assert(0 && "Invalid max_tx_size.");
       return NULL;
   }
 }
diff --git a/vp9/decoder/vp9_decodeframe.c b/vp9/decoder/vp9_decodeframe.c
index 56b05cee1f..b14f1efb0c 100644
--- a/vp9/decoder/vp9_decodeframe.c
+++ b/vp9/decoder/vp9_decodeframe.c
@@ -266,7 +266,7 @@ static void inverse_transform_block(MACROBLOCKD* xd, int plane, int block,
         vp9_idct32x32_add(dqcoeff, dst, stride, eob);
         break;
       default:
-        assert(!"Invalid transform size");
+        assert(0 && "Invalid transform size");
     }
 
     if (eob == 1) {
@@ -507,7 +507,7 @@ static void decode_modes_sb(VP9_COMMON *const cm, MACROBLOCKD *const xd,
         decode_modes_sb(cm, xd, tile, mi_row + hbs, mi_col + hbs, r, subsize);
         break;
       default:
-        assert(!"Invalid partition type");
+        assert(0 && "Invalid partition type");
     }
   }
 
diff --git a/vp9/decoder/vp9_decodemv.c b/vp9/decoder/vp9_decodemv.c
index 164576d0ca..5070c7e6a2 100644
--- a/vp9/decoder/vp9_decodemv.c
+++ b/vp9/decoder/vp9_decodemv.c
@@ -308,7 +308,7 @@ static void read_ref_frames(VP9_COMMON *const cm, MACROBLOCKD *const xd,
 
       ref_frame[1] = NONE;
     } else {
-      assert(!"Invalid prediction mode.");
+      assert(0 && "Invalid prediction mode.");
     }
   }
 }
diff --git a/vp9/encoder/vp9_encodemb.c b/vp9/encoder/vp9_encodemb.c
index c6b1268be4..f98bd046b7 100644
--- a/vp9/encoder/vp9_encodemb.c
+++ b/vp9/encoder/vp9_encodemb.c
@@ -468,7 +468,7 @@ static void encode_block(int plane, int block, BLOCK_SIZE plane_bsize,
       xd->itxm_add(dqcoeff, dst, pd->dst.stride, p->eobs[block]);
       break;
     default:
-      assert(!"Invalid transform size");
+      assert(0 && "Invalid transform size");
   }
 }
 
diff --git a/vp9/encoder/vp9_rdopt.c b/vp9/encoder/vp9_rdopt.c
index 9bade98494..2693e60ef6 100644
--- a/vp9/encoder/vp9_rdopt.c
+++ b/vp9/encoder/vp9_rdopt.c
@@ -686,7 +686,7 @@ void vp9_get_entropy_contexts(TX_SIZE tx_size,
         t_left[i] = !!*(const uint64_t *)&left[i];
       break;
     default:
-      assert(!"Invalid transform size.");
+      assert(0 && "Invalid transform size.");
   }
 }
 
@@ -3237,7 +3237,7 @@ int64_t vp9_rd_pick_inter_mode_sb(VP9_COMP *cpi, MACROBLOCK *x,
             break;
           case NONE:
           case MAX_REF_FRAMES:
-            assert(!"Invalid Reference frame");
+            assert(0 && "Invalid Reference frame");
         }
       }
       if (cpi->mode_skip_mask & ((int64_t)1 << mode_index))
@@ -3902,7 +3902,7 @@ int64_t vp9_rd_pick_inter_mode_sub8x8(VP9_COMP *cpi, MACROBLOCK *x,
             break;
           case NONE:
           case MAX_REF_FRAMES:
-            assert(!"Invalid Reference frame");
+            assert(0 && "Invalid Reference frame");
         }
       }
       if (cpi->mode_skip_mask & ((int64_t)1 << mode_index))
diff --git a/vp9/vp9_cx_iface.c b/vp9/vp9_cx_iface.c
index ee0aa1ba76..6bfca8d80b 100644
--- a/vp9/vp9_cx_iface.c
+++ b/vp9/vp9_cx_iface.c
@@ -100,7 +100,7 @@ static VP9_REFFRAME ref_frame_to_vp9_reframe(vpx_ref_frame_type_t frame) {
     case VP8_ALTR_FRAME:
       return VP9_ALT_FLAG;
   }
-  assert(!"Invalid Reference Frame");
+  assert(0 && "Invalid Reference Frame");
   return VP9_LAST_FLAG;
 }
 
-- 
GitLab