diff options
author | Bryce Harrington <bryce@osg.samsung.com> | 2015-05-19 15:32:09 -0700 |
---|---|---|
committer | Bryce Harrington <bryce@osg.samsung.com> | 2015-05-19 15:32:09 -0700 |
commit | 7dd12ec713c3e5c90999ded787c1ef83031ecda4 (patch) | |
tree | d0c9dee6ad06821b222a52aa67c494cae8215e3c /clients | |
parent | c056a987b67c88e5fcca57d96163ab2f210ea2ca (diff) | |
download | weston-7dd12ec713c3e5c90999ded787c1ef83031ecda4.tar.gz |
editor: warn when write fails
Fixes warning:
clients/editor.c: In function ‘data_source_send’:
clients/editor.c:573:7: warning: ignoring return value of ‘write’,
declared with attribute warn_unused_result [-Wunused-result]
write(fd, editor->selected_text, strlen(editor->selected_text) + 1);
^
Diffstat (limited to 'clients')
-rw-r--r-- | clients/editor.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clients/editor.c b/clients/editor.c index f77a48df..5407337c 100644 --- a/clients/editor.c +++ b/clients/editor.c @@ -570,7 +570,8 @@ data_source_send(void *data, { struct editor *editor = data; - write(fd, editor->selected_text, strlen(editor->selected_text) + 1); + if (write(fd, editor->selected_text, strlen(editor->selected_text) + 1) < 0) + fprintf(stderr, "write failed: %m\n"); } static void |