summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/glib-2.0/glib-2.0/0001-Do-not-ignore-return-value-of-write.patch
diff options
context:
space:
mode:
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.patch17
1 files changed, 7 insertions, 10 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
index aee96aaa6e..0ebf138d60 100644
--- 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
@@ -1,30 +1,30 @@
1From d6501b107940e9f548c89236d773c6d33c15a5c9 Mon Sep 17 00:00:00 2001 1From d250652782b65b071b7cc8f01f2db833df104e0e Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Sat, 16 Apr 2016 13:28:59 -0700 3Date: Sat, 16 Apr 2016 13:28:59 -0700
4Subject: [PATCH 1/2] Do not ignore return value of write() 4Subject: [PATCH] Do not ignore return value of write()
5 5
6gcc warns about ignoring return value when compiling 6gcc warns about ignoring return value when compiling
7with fortify turned on. 7with fortify turned on.
8 8
9assert when write() fails 9assert when write() fails
10 10
11Signed-off-by: Khem Raj <raj.khem@gmail.com>
12---
13Upstream-Status: Submitted 11Upstream-Status: Submitted
12Signed-off-by: Khem Raj <raj.khem@gmail.com>
14 13
14---
15 glib/tests/unix.c | 5 +++-- 15 glib/tests/unix.c | 5 +++--
16 1 file changed, 3 insertions(+), 2 deletions(-) 16 1 file changed, 3 insertions(+), 2 deletions(-)
17 17
18diff --git a/glib/tests/unix.c b/glib/tests/unix.c 18diff --git a/glib/tests/unix.c b/glib/tests/unix.c
19index 3543458..4e7ed85 100644 19index 9d55a6c..a07f945 100644
20--- a/glib/tests/unix.c 20--- a/glib/tests/unix.c
21+++ b/glib/tests/unix.c 21+++ b/glib/tests/unix.c
22@@ -32,14 +32,15 @@ test_pipe (void) 22@@ -32,14 +32,15 @@ test_pipe (void)
23 GError *error = NULL; 23 GError *error = NULL;
24 int pipefd[2]; 24 int pipefd[2];
25 char buf[1024]; 25 char buf[1024];
26- ssize_t bytes_read; 26- gssize bytes_read;
27+ ssize_t bytes_read, bytes_written; 27+ gssize bytes_read, bytes_written;
28 gboolean res; 28 gboolean res;
29 29
30 res = g_unix_open_pipe (pipefd, FD_CLOEXEC, &error); 30 res = g_unix_open_pipe (pipefd, FD_CLOEXEC, &error);
@@ -37,6 +37,3 @@ index 3543458..4e7ed85 100644
37 memset (buf, 0, sizeof (buf)); 37 memset (buf, 0, sizeof (buf));
38 bytes_read = read (pipefd[0], buf, sizeof(buf) - 1); 38 bytes_read = read (pipefd[0], buf, sizeof(buf) - 1);
39 g_assert_cmpint (bytes_read, >, 0); 39 g_assert_cmpint (bytes_read, >, 0);
40--
412.8.0
42