ref: 46a1ee32994ea418cdc26494067723f80799d836
parent: 68622b0a2e184bd95b3121f0eda654713cfa9e4d
author: robs <robs>
date: Fri Sep 11 12:33:17 EDT 2009
fix warnings
--- a/src/.cvsignore
+++ b/src/.cvsignore
@@ -1,6 +1,6 @@
Makefile Makefile.in
sox_sample_test
-example0 example1 example2 example3
+example0 example1 example2 example3 example4
soxconfig.h.in soxconfig.h soxstdint.h
.deps
stamp-h1
--- a/src/example4.c
+++ b/src/example4.c
@@ -45,7 +45,7 @@
/* The (maximum) number of samples that we shall read/write at a time;
* chosen as a rough match to typical operating system I/O buffer size: */
- #define MAX_SAMPLES 2048
+ #define MAX_SAMPLES (size_t)2048
sox_sample_t samples[MAX_SAMPLES]; /* Temporary store whilst copying. */
size_t number_read;
--- a/src/gsrt.c
+++ b/src/gsrt.c
@@ -22,8 +22,8 @@
#define VERSION 0x1000000
#define MAX_FILE_SIZE 0x10000
-#define HEADER_SIZE 512
-#define PADDING_SIZE 478
+#define HEADER_SIZE (size_t)512
+#define PADDING_SIZE (size_t)478
static char const id[16] = "ring.bin";
@@ -97,7 +97,7 @@
lsx_warn("invalid checksum in input file %s", ft->filename);
}
- lsx_skipbytes(ft, 2 + 4 + 6); /* Checksum, version, and time stamp. */
+ lsx_skipbytes(ft, (size_t)(2 + 4 + 6)); /* Checksum, version, time stamp. */
lsx_readchars(ft, read_id, sizeof(read_id));
if (memcmp(read_id, id, strlen(id))) {
@@ -172,7 +172,7 @@
lsx_readsw(ft, &int16);
checksum += int16;
}
- if (!lsx_seeki(ft, 0, SEEK_SET)) {
+ if (!lsx_seeki(ft, (size_t)0, SEEK_SET)) {
lsx_writedw(ft, file_size);
lsx_writesw(ft, -checksum);
return SOX_SUCCESS;
--- a/src/pulseaudio.c
+++ b/src/pulseaudio.c
@@ -38,7 +38,7 @@
app_str = "playback";
}
- if (strncmp(ft->filename, "default", 7) == 0)
+ if (strncmp(ft->filename, "default", (size_t)7) == 0)
dev = NULL;
else
dev = ft->filename;