aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2009-01-29 17:32:58 +0100
committerMarcel Holtmann <marcel@holtmann.org>2012-07-29 19:48:28 -0700
commit7b2f9e65c03cb0336a250e33a9f28c00cab72c5d (patch)
tree91c5821483d09678a0b748c094dd81659da22667
parentb369ea3525442e56a3e2049ba4541e6b7d100e20 (diff)
sbc: Add -Wno-sign-compare for the library and fix the other warnings
-rw-r--r--sbc/sbcdec.c2
-rw-r--r--sbc/sbcenc.c2
-rw-r--r--sbc/sbcinfo.c5
3 files changed, 5 insertions, 4 deletions
diff --git a/sbc/sbcdec.c b/sbc/sbcdec.c
index 462663a..dfe092f 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 fba9be3..d284789 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 7420bfd..339518a 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);