ref: 9620cf7718d5f3e580b6457cf131ddf424312115
parent: 9f7d17bd118892208591379aaf8a45a3e2c1a736
author: Ralph Giles <[email protected]>
date: Wed Nov 30 05:38:40 EST 2011
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.
--- a/celt/fixed_debug.h
+++ b/celt/fixed_debug.h
@@ -251,12 +251,12 @@
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 @@
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;