aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2012-03-19 20:37:17 +0100
committerMax Kellermann <max@duempel.org>2012-03-19 23:26:47 +0100
commit79eb7623efb3105094dcb77f8688e39b8288155e (patch)
tree85657479c22e498f908b10cb01b8df18b6911370 /test
parentb9e64d04720cc114aa405a86332b7cb1321db8c6 (diff)
downloadmpd-79eb7623efb3105094dcb77f8688e39b8288155e.tar.gz
mpd-79eb7623efb3105094dcb77f8688e39b8288155e.tar.xz
mpd-79eb7623efb3105094dcb77f8688e39b8288155e.zip
event_pipe, test: explicitly ignore write() return value
Some compilers are very picky, but we really aren't interested in the return value.
Diffstat (limited to 'test')
-rw-r--r--test/read_tags.c2
-rw-r--r--test/run_convert.c2
-rw-r--r--test/run_decoder.c2
-rw-r--r--test/run_encoder.c5
-rw-r--r--test/run_normalize.c3
-rw-r--r--test/software_volume.c2
6 files changed, 9 insertions, 7 deletions
diff --git a/test/read_tags.c b/test/read_tags.c
index 9af2bbac4..8906e1c8a 100644
--- a/test/read_tags.c
+++ b/test/read_tags.c
@@ -104,7 +104,7 @@ decoder_data(G_GNUC_UNUSED struct decoder *decoder,
const void *data, size_t datalen,
G_GNUC_UNUSED uint16_t bit_rate)
{
- write(1, data, datalen);
+ G_GNUC_UNUSED ssize_t nbytes = write(1, data, datalen);
return DECODE_COMMAND_NONE;
}
diff --git a/test/run_convert.c b/test/run_convert.c
index 415d7535c..ae76bc367 100644
--- a/test/run_convert.c
+++ b/test/run_convert.c
@@ -115,7 +115,7 @@ int main(int argc, char **argv)
return 2;
}
- write(1, output, length);
+ G_GNUC_UNUSED ssize_t ignored = write(1, output, length);
}
pcm_convert_deinit(&state);
diff --git a/test/run_decoder.c b/test/run_decoder.c
index 4199f3c32..154b47324 100644
--- a/test/run_decoder.c
+++ b/test/run_decoder.c
@@ -126,7 +126,7 @@ decoder_data(G_GNUC_UNUSED struct decoder *decoder,
const void *data, size_t datalen,
G_GNUC_UNUSED uint16_t kbit_rate)
{
- write(1, data, datalen);
+ G_GNUC_UNUSED ssize_t nbytes = write(1, data, datalen);
return DECODE_COMMAND_NONE;
}
diff --git a/test/run_encoder.c b/test/run_encoder.c
index 4b512d46a..16e633029 100644
--- a/test/run_encoder.c
+++ b/test/run_encoder.c
@@ -36,8 +36,9 @@ encoder_to_stdout(struct encoder *encoder)
size_t length;
static char buffer[32768];
- while ((length = encoder_read(encoder, buffer, sizeof(buffer))) > 0)
- write(1, buffer, length);
+ while ((length = encoder_read(encoder, buffer, sizeof(buffer))) > 0) {
+ G_GNUC_UNUSED ssize_t ignored = write(1, buffer, length);
+ }
}
int main(int argc, char **argv)
diff --git a/test/run_normalize.c b/test/run_normalize.c
index dd1140782..958015973 100644
--- a/test/run_normalize.c
+++ b/test/run_normalize.c
@@ -65,7 +65,8 @@ int main(int argc, char **argv)
while ((nbytes = read(0, buffer, sizeof(buffer))) > 0) {
Compressor_Process_int16(compressor,
(int16_t *)buffer, nbytes / 2);
- write(1, buffer, nbytes);
+
+ G_GNUC_UNUSED ssize_t ignored = write(1, buffer, nbytes);
}
Compressor_delete(compressor);
diff --git a/test/software_volume.c b/test/software_volume.c
index c4de69328..789fffe61 100644
--- a/test/software_volume.c
+++ b/test/software_volume.c
@@ -65,6 +65,6 @@ int main(int argc, char **argv)
return 2;
}
- write(1, buffer, nbytes);
+ G_GNUC_UNUSED ssize_t ignored = write(1, buffer, nbytes);
}
}