Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.xiph.org/xiph/opus.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRalph Giles <giles@mozilla.com>2011-11-30 22:38:40 +0400
committerRalph Giles <giles@mozilla.com>2012-03-06 05:09:54 +0400
commit9620cf7718d5f3e580b6457cf131ddf424312115 (patch)
tree80e3db09211c8d0a57ea2583f52b277b31a65bab
parent9f7d17bd118892208591379aaf8a45a3e2c1a736 (diff)
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.
-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;