diff options
Diffstat (limited to 'meta/recipes-core/glib-2.0/glib-2.0/0001-Do-not-ignore-return-value-of-write.patch')
-rw-r--r-- | meta/recipes-core/glib-2.0/glib-2.0/0001-Do-not-ignore-return-value-of-write.patch | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/0001-Do-not-ignore-return-value-of-write.patch b/meta/recipes-core/glib-2.0/glib-2.0/0001-Do-not-ignore-return-value-of-write.patch deleted file mode 100644 index f3a0069633..0000000000 --- a/meta/recipes-core/glib-2.0/glib-2.0/0001-Do-not-ignore-return-value-of-write.patch +++ /dev/null | |||
@@ -1,39 +0,0 @@ | |||
1 | From 658c034d92027dc8af5f784cae852123fac79b19 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Sat, 16 Apr 2016 13:28:59 -0700 | ||
4 | Subject: [PATCH] Do not ignore return value of write() | ||
5 | |||
6 | gcc warns about ignoring return value when compiling | ||
7 | with fortify turned on. | ||
8 | |||
9 | assert when write() fails | ||
10 | |||
11 | Upstream-Status: Submitted | ||
12 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
13 | |||
14 | --- | ||
15 | glib/tests/unix.c | 5 +++-- | ||
16 | 1 file changed, 3 insertions(+), 2 deletions(-) | ||
17 | |||
18 | diff --git a/glib/tests/unix.c b/glib/tests/unix.c | ||
19 | index 7639d06..f941141 100644 | ||
20 | --- a/glib/tests/unix.c | ||
21 | +++ b/glib/tests/unix.c | ||
22 | @@ -33,14 +33,15 @@ test_pipe (void) | ||
23 | GError *error = NULL; | ||
24 | int pipefd[2]; | ||
25 | char buf[1024]; | ||
26 | - gssize bytes_read; | ||
27 | + gssize bytes_read, bytes_written; | ||
28 | gboolean res; | ||
29 | |||
30 | res = g_unix_open_pipe (pipefd, FD_CLOEXEC, &error); | ||
31 | g_assert (res); | ||
32 | g_assert_no_error (error); | ||
33 | |||
34 | - write (pipefd[1], "hello", sizeof ("hello")); | ||
35 | + bytes_written = write (pipefd[1], "hello", sizeof ("hello")); | ||
36 | + g_assert (bytes_written != -1 && "write() failed"); | ||
37 | memset (buf, 0, sizeof (buf)); | ||
38 | bytes_read = read (pipefd[0], buf, sizeof(buf) - 1); | ||
39 | g_assert_cmpint (bytes_read, >, 0); | ||