summaryrefslogtreecommitdiffstats
path: root/sbc
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2009-01-29 17:32:58 +0100
committerMarcel Holtmann <marcel@holtmann.org>2009-01-29 17:32:58 +0100
commitdc1d52cfac56e18d2942c9ee78a96f351e322b77 (patch)
treea41c27ce725153dec2ee306f8a02f89555601adc /sbc
parentbbbb1adae92d53840ef28ec955a388d2d2bf7c0a (diff)
Add -Wno-sign-compare for the library and fix the other warnings
Diffstat (limited to 'sbc')
-rw-r--r--sbc/Makefile.am4
-rw-r--r--sbc/sbcdec.c2
-rw-r--r--sbc/sbcenc.c2
-rw-r--r--sbc/sbcinfo.c5
4 files changed, 7 insertions, 6 deletions
diff --git a/sbc/Makefile.am b/sbc/Makefile.am
index 3feb178e..1f8e7f95 100644
--- a/sbc/Makefile.am
+++ b/sbc/Makefile.am
@@ -12,8 +12,8 @@ libsbc_la_SOURCES = sbc.h sbc.c sbc_math.h sbc_tables.h \
sbc_primitives.h sbc_primitives_mmx.h sbc_primitives_neon.h \
sbc_primitives.c sbc_primitives_mmx.c sbc_primitives_neon.c
-libsbc_la_CFLAGS = -finline-functions -funswitch-loops -fgcse-after-reload \
- -funroll-loops
+libsbc_la_CFLAGS = -finline-functions -funswitch-loops \
+ -fgcse-after-reload -funroll-loops -Wno-sign-compare
noinst_PROGRAMS = sbcinfo sbcdec sbcenc $(sndfile_programs)
diff --git a/sbc/sbcdec.c b/sbc/sbcdec.c
index 462663ab..dfe092f5 100644
--- a/sbc/sbcdec.c
+++ b/sbc/sbcdec.c
@@ -143,7 +143,7 @@ static void decode(char *filename, char *output, int tofile)
au_hdr.channels = BE_INT(channels);
written = write(ad, &au_hdr, sizeof(au_hdr));
- if (written < sizeof(au_hdr)) {
+ if (written < (int) sizeof(au_hdr)) {
fprintf(stderr, "Failed to write header\n");
goto close;
}
diff --git a/sbc/sbcenc.c b/sbc/sbcenc.c
index fba9be30..d284789a 100644
--- a/sbc/sbcenc.c
+++ b/sbc/sbcenc.c
@@ -67,7 +67,7 @@ static void encode(char *filename, int subbands, int bitpool, int joint,
fd = fileno(stdin);
len = read(fd, &au_hdr, sizeof(au_hdr));
- if (len < sizeof(au_hdr)) {
+ if (len < (int) sizeof(au_hdr)) {
if (fd > fileno(stderr))
fprintf(stderr, "Can't read header from file %s: %s\n",
filename, strerror(errno));
diff --git a/sbc/sbcinfo.c b/sbc/sbcinfo.c
index 7420bfd2..339518a2 100644
--- a/sbc/sbcinfo.c
+++ b/sbc/sbcinfo.c
@@ -174,7 +174,8 @@ static int analyze_file(char *filename)
double rate;
int bitpool[SIZE], frame_len[SIZE];
int subbands, blocks, freq, mode, method;
- int n, p1, p2, fd, len, size, count, num;
+ int n, p1, p2, fd, len, size, num;
+ unsigned int count;
if (strcmp(filename, "-")) {
printf("Filename\t\t%s\n", basename(filename));
@@ -235,7 +236,7 @@ static int analyze_file(char *filename)
if (len == 0)
break;
- if (len < sizeof(hdr) || hdr.syncword != 0x9c) {
+ if (len < (int) sizeof(hdr) || hdr.syncword != 0x9c) {
fprintf(stderr, "Corrupted SBC stream "
"(len %d syncword 0x%02x)\n",
len, hdr.syncword);