ref: 31b922e79cbaad7b5143c044ce58b01b4a9be7f8
parent: be67ea8c7ca22d4803b3828c183af1d47a3932cb
author: Jean-Marc Valin <jmvalin@jmvalin.ca>
date: Mon Jun 27 21:02:37 EDT 2022
Silence some warnings for fixed-point debug builds Reviewed by Timothy B. Terriberry.
--- a/celt/fixed_debug.h
+++ b/celt/fixed_debug.h
@@ -214,7 +214,7 @@
opus_int64 res;
if (!VERIFY_INT(a) || !VERIFY_SHORT(shift))
{
- fprintf (stderr, "SHL32: inputs are not int: %lld %d in %s: line %d\n", a, shift, file, line);
+ fprintf (stderr, "SHL32: inputs are not int: %lld %d in %s: line %d\n", (long long)a, shift, file, line);
#ifdef FIXED_DEBUG_ASSERT
celt_assert(0);
#endif
@@ -222,7 +222,7 @@
res = a<<shift;
if (!VERIFY_INT(res))
{
- fprintf (stderr, "SHL32: output is not int: %lld<<%d = %lld in %s: line %d\n", a, shift, res, file, line);
+ fprintf (stderr, "SHL32: output is not int: %lld<<%d = %lld in %s: line %d\n", (long long)a, shift, (long long)res, file, line);
#ifdef FIXED_DEBUG_ASSERT
celt_assert(0);
#endif
@@ -339,7 +339,7 @@
opus_uint64 res;
if (!VERIFY_UINT(a) || !VERIFY_UINT(b))
{
- fprintf (stderr, "UADD32: inputs are not uint32: %llu %llu in %s: line %d\n", a, b, file, line);
+ fprintf (stderr, "UADD32: inputs are not uint32: %llu %llu in %s: line %d\n", (unsigned long long)a, (unsigned long long)b, file, line);
#ifdef FIXED_DEBUG_ASSERT
celt_assert(0);
#endif
@@ -347,7 +347,7 @@
res = a+b;
if (!VERIFY_UINT(res))
{
- fprintf (stderr, "UADD32: output is not uint32: %llu in %s: line %d\n", res, file, line);
+ fprintf (stderr, "UADD32: output is not uint32: %llu in %s: line %d\n", (unsigned long long)res, file, line);
#ifdef FIXED_DEBUG_ASSERT
celt_assert(0);
#endif
@@ -363,7 +363,7 @@
opus_uint64 res;
if (!VERIFY_UINT(a) || !VERIFY_UINT(b))
{
- fprintf (stderr, "USUB32: inputs are not uint32: %llu %llu in %s: line %d\n", a, b, file, line);
+ fprintf (stderr, "USUB32: inputs are not uint32: %llu %llu in %s: line %d\n", (unsigned long long)a, (unsigned long long)b, file, line);
#ifdef FIXED_DEBUG_ASSERT
celt_assert(0);
#endif
@@ -370,7 +370,7 @@
}
if (a<b)
{
- fprintf (stderr, "USUB32: inputs underflow: %llu < %llu in %s: line %d\n", a, b, file, line);
+ fprintf (stderr, "USUB32: inputs underflow: %llu < %llu in %s: line %d\n", (unsigned long long)a, (unsigned long long)b, file, line);
#ifdef FIXED_DEBUG_ASSERT
celt_assert(0);
#endif
@@ -378,7 +378,7 @@
res = a-b;
if (!VERIFY_UINT(res))
{
- fprintf (stderr, "USUB32: output is not uint32: %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", (unsigned long long)a, (unsigned long long)b, (unsigned long long)res, file, line);
#ifdef FIXED_DEBUG_ASSERT
celt_assert(0);
#endif
@@ -416,7 +416,7 @@
opus_int64 res;
if (!VERIFY_INT(a) || !VERIFY_INT(b))
{
- fprintf (stderr, "MULT32_32_32: inputs are not int: %d %d\n", a, b);
+ fprintf (stderr, "MULT32_32_32: inputs are not int: %lld %lld\n", (long long)a, (long long)b);
#ifdef FIXED_DEBUG_ASSERT
celt_assert(0);
#endif
@@ -424,7 +424,7 @@
res = a*b;
if (!VERIFY_INT(res))
{
- fprintf (stderr, "MULT32_32_32: output is not int: %d\n", res);
+ fprintf (stderr, "MULT32_32_32: output is not int: %lld\n", (long long)res);
#ifdef FIXED_DEBUG_ASSERT
celt_assert(0);
#endif
@@ -438,7 +438,7 @@
opus_int64 res;
if (!VERIFY_INT(a) || !VERIFY_INT(b))
{
- fprintf (stderr, "MULT32_32_Q16: inputs are not int: %d %d\n", a, b);
+ fprintf (stderr, "MULT32_32_Q16: inputs are not int: %lld %lld\n", (long long)a, (long long)b);
#ifdef FIXED_DEBUG_ASSERT
celt_assert(0);
#endif
@@ -446,7 +446,7 @@
res = ((opus_int64)(a)*(opus_int64)(b)) >> 16;
if (!VERIFY_INT(res))
{
- fprintf (stderr, "MULT32_32_Q16: output is not int: %d*%d=%d\n", a, b, (int)res);
+ fprintf (stderr, "MULT32_32_Q16: output is not int: %lld*%lld=%lld\n", (long long)a, (long long)b, (long long)res);
#ifdef FIXED_DEBUG_ASSERT
celt_assert(0);
#endif
@@ -831,6 +831,6 @@
#undef PRINT_MIPS
-#define PRINT_MIPS(file) do {fprintf (file, "total complexity = %llu MIPS\n", celt_mips);} while (0);
+#define PRINT_MIPS(file) do {fprintf (file, "total complexity = %llu MIPS\n", (unsigned long long)celt_mips);} while (0);
#endif