mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2025-12-31 23:00:15 +01:00
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:
parent
c056a987b6
commit
7dd12ec713
1 changed files with 2 additions and 1 deletions
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue