Fix warning when discarding const qualifier.
Cherry-pick Daala 211c2a41: Clean up EC tell() and tell_frac() functions.
Add a const qualifier to the od_ec_enc and od_ec_dec parameters of
the od_ec_enc_tell(), od_ec_enc_tell_frac(), od_ec_dec_tell(), and
od_ec_dec_tell_frac() functions.
Add an OD_WARN_UNUSED_RESULT to od_ec_enc_tell_frac().
Change-Id: Ia50e2fd75e98d8a03d993449d658b695cf56e6fb
diff --git a/aom_dsp/entdec.c b/aom_dsp/entdec.c
index a4e1d1d..880b885 100644
--- a/aom_dsp/entdec.c
+++ b/aom_dsp/entdec.c
@@ -518,7 +518,7 @@
Return: The number of bits.
This will always be slightly larger than the exact value (e.g., all
rounding error is in the positive direction).*/
-int od_ec_dec_tell(od_ec_dec *dec) {
+int od_ec_dec_tell(const od_ec_dec *dec) {
return ((dec->end - dec->eptr) + (dec->bptr - dec->buf)) * 8 - dec->cnt -
dec->nend_bits + dec->tell_offs;
}
@@ -529,6 +529,6 @@
Return: The number of bits scaled by 2**OD_BITRES.
This will always be slightly larger than the exact value (e.g., all
rounding error is in the positive direction).*/
-uint32_t od_ec_dec_tell_frac(od_ec_dec *dec) {
+uint32_t od_ec_dec_tell_frac(const od_ec_dec *dec) {
return od_ec_tell_frac(od_ec_dec_tell(dec), dec->rng);
}