aboutsummaryrefslogtreecommitdiff
path: root/celt/fixed_debug.h
diff options
context:
space:
mode:
authorRalph Giles <giles@mozilla.com>2011-11-30 10:38:40 -0800
committerRalph Giles <giles@mozilla.com>2012-03-05 17:09:54 -0800
commit9620cf7718d5f3e580b6457cf131ddf424312115 (patch)
tree80e3db09211c8d0a57ea2583f52b277b31a65bab /celt/fixed_debug.h
parent9f7d17bd118892208591379aaf8a45a3e2c1a736 (diff)
downloadlibopus-9620cf7718d5f3e580b6457cf131ddf424312115.tar.gz
Print the actual arguments to the debug UADD/SUB32 routines.
The versions of UADD32 and USUB32 in fixed_debug.h take unsigned long long (ideally 64 bit) inputs, and range check the arguments. However, the printed warnings cast them to (unsigned), which is confusing. Instead, print the full value passed in. NB this will make negative values print has huge, rather than negative, values.
Diffstat (limited to 'celt/fixed_debug.h')
-rw-r--r--celt/fixed_debug.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/celt/fixed_debug.h b/celt/fixed_debug.h
index 1400ec91..7b3df645 100644
--- a/celt/fixed_debug.h
+++ b/celt/fixed_debug.h
@@ -251,12 +251,12 @@ static inline unsigned int UADD32_(unsigned long long a, unsigned long long b, c
unsigned long long res;
if (!VERIFY_UINT(a) || !VERIFY_UINT(b))
{
- fprintf (stderr, "UADD32: inputs are not int: %u %u in %s: line %d\n", (unsigned)a, (unsigned)b, file, line);
+ fprintf (stderr, "UADD32: inputs are not uint32: %llu %llu in %s: line %d\n", a, b, file, line);
}
res = a+b;
if (!VERIFY_UINT(res))
{
- fprintf (stderr, "UADD32: output is not int: %u in %s: line %d\n", (unsigned)res, file, line);
+ fprintf (stderr, "UADD32: output is not uint32: %llu in %s: line %d\n", res, file, line);
}
celt_mips+=2;
return res;
@@ -269,12 +269,12 @@ static inline unsigned int USUB32_(unsigned long long a, unsigned long long b, c
unsigned long long res;
if (!VERIFY_UINT(a) || !VERIFY_UINT(b))
{
- fprintf (stderr, "USUB32: inputs are not int: %llu %llu in %s: line %d\n", (unsigned)a, (unsigned)b, file, line);
+ fprintf (stderr, "USUB32: inputs are not uint32: %llu %llu in %s: line %d\n", a, b, file, line);
}
res = a-b;
if (!VERIFY_UINT(res))
{
- fprintf (stderr, "USUB32: output is not int: %llu - %llu = %llu in %s: line %d\n", a, b, res, file, line);
+ fprintf (stderr, "USUB32: output is not uint32: %llu - %llu = %llu in %s: line %d\n", a, b, res, file, line);
}
celt_mips+=2;
return res;