* [PATCH BlueZ] unit: Fix compilation issue with ignored return value
@ 2013-01-04 13:47 Anderson Lizardo
2013-01-04 14:18 ` Johan Hedberg
0 siblings, 1 reply; 2+ messages in thread
From: Anderson Lizardo @ 2013-01-04 13:47 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Anderson Lizardo
Fix this compilation warning:
unit/test-sdp.c: In function ‘send_pdu’:
unit/test-sdp.c:600:7: error: ignoring return value of ‘write’, declared
with attribute warn_unused_result [-Werror=unused-result]
---
unit/test-sdp.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/unit/test-sdp.c b/unit/test-sdp.c
index baa93d0..1a852de 100644
--- a/unit/test-sdp.c
+++ b/unit/test-sdp.c
@@ -596,8 +596,10 @@ struct test_data {
static gboolean send_pdu(gpointer user_data)
{
struct context *context = user_data;
+ ssize_t len;
- write(context->fd, context->req_data, context->req_size);
+ len = write(context->fd, context->req_data, context->req_size);
+ g_assert(len > 0 && (size_t) len == context->req_size);
return FALSE;
}
--
1.7.9.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-01-04 14:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-04 13:47 [PATCH BlueZ] unit: Fix compilation issue with ignored return value Anderson Lizardo
2013-01-04 14:18 ` Johan Hedberg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox