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);
        ^
This commit is contained in:
Bryce Harrington 2015-05-19 15:32:09 -07:00
parent c056a987b6
commit 7dd12ec713
1 changed files with 2 additions and 1 deletions

View File

@ -570,7 +570,8 @@ data_source_send(void *data,
{ {
struct editor *editor = 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 static void