Use %lu instead of %ld to fprintf unsigned longs.
Fixes a cppcheck warning. Possibly we should just convert
the array type to `long` since that's what oggpack_look()
returns, using negative values to report error.
However, none of the compared values are out of range
for either type so it doesn't really matter.
Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
Signed-off-by: Ralph Giles <giles@thaumas.net>
diff --git a/src/bitwise.c b/src/bitwise.c
index 81865ef..f5ef791 100644
--- a/src/bitwise.c
+++ b/src/bitwise.c
@@ -889,7 +889,7 @@
for(i=0;i<test2size;i++){
if(oggpack_look(&r,32)==-1)report("out of data. failed!");
if(oggpack_look(&r,32)!=large[i]){
- fprintf(stderr,"%ld != %ld (%lx!=%lx):",oggpack_look(&r,32),large[i],
+ fprintf(stderr,"%ld != %lu (%lx!=%lx):",oggpack_look(&r,32),large[i],
oggpack_look(&r,32),large[i]);
report("read incorrect value!\n");
}
@@ -999,7 +999,7 @@
for(i=0;i<test2size;i++){
if(oggpackB_look(&r,32)==-1)report("out of data. failed!");
if(oggpackB_look(&r,32)!=large[i]){
- fprintf(stderr,"%ld != %ld (%lx!=%lx):",oggpackB_look(&r,32),large[i],
+ fprintf(stderr,"%ld != %lu (%lx!=%lx):",oggpackB_look(&r,32),large[i],
oggpackB_look(&r,32),large[i]);
report("read incorrect value!\n");
}