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 20:37:25 +0100
commit36827e11346cc3076e608ae5137afb0f7fb7c65a (patch)
tree1fd87cfc0d7d0a80f9a545715d3c657859dece1f /test
parent351ac4a2c0a6dfa0774e98d9b5a3d9db33e01274 (diff)
downloadmpd-36827e11346cc3076e608ae5137afb0f7fb7c65a.tar.gz
mpd-36827e11346cc3076e608ae5137afb0f7fb7c65a.tar.xz
mpd-36827e11346cc3076e608ae5137afb0f7fb7c65a.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/dump_playlist.c2
-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
7 files changed, 10 insertions, 8 deletions
diff --git a/test/dump_playlist.c b/test/dump_playlist.c
index b38180033..0570f6e49 100644
--- a/test/dump_playlist.c
+++ b/test/dump_playlist.c
@@ -95,7 +95,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/read_tags.c b/test/read_tags.c
index b5ca8e55a..faf9a45c0 100644
--- a/test/read_tags.c
+++ b/test/read_tags.c
@@ -106,7 +106,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 57a3a2f7f..bc95d959f 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 0485f47d0..e6712c75b 100644
--- a/test/run_decoder.c
+++ b/test/run_decoder.c
@@ -128,7 +128,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 5e6b158c6..3b3ec7240 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 d16ed60ea..fc26829ed 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 1e068be41..2357da672 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);
}
}