diff options
author | Max Kellermann <max@duempel.org> | 2012-03-19 20:37:17 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2012-03-19 23:26:47 +0100 |
commit | 79eb7623efb3105094dcb77f8688e39b8288155e (patch) | |
tree | 85657479c22e498f908b10cb01b8df18b6911370 | |
parent | b9e64d04720cc114aa405a86332b7cb1321db8c6 (diff) | |
download | mpd-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 '')
-rw-r--r-- | src/event_pipe.c | 3 | ||||
-rw-r--r-- | test/read_tags.c | 2 | ||||
-rw-r--r-- | test/run_convert.c | 2 | ||||
-rw-r--r-- | test/run_decoder.c | 2 | ||||
-rw-r--r-- | test/run_encoder.c | 5 | ||||
-rw-r--r-- | test/run_normalize.c | 3 | ||||
-rw-r--r-- | test/software_volume.c | 2 |
7 files changed, 11 insertions, 8 deletions
diff --git a/src/event_pipe.c b/src/event_pipe.c index 5b519984f..484b7a625 100644 --- a/src/event_pipe.c +++ b/src/event_pipe.c @@ -159,5 +159,6 @@ void event_pipe_emit_fast(enum pipe_event event) assert((unsigned)event < PIPE_EVENT_MAX); pipe_events[event] = true; - (void)write(event_pipe[1], "", 1); + + G_GNUC_UNUSED ssize_t nbytes = write(event_pipe[1], "", 1); } 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); } } |