summaryrefslogtreecommitdiffstats
path: root/meta/recipes-sato/puzzles
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2015-12-30 23:34:20 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-01-24 09:40:28 +0000
commitec187d35f4a3ff85bdc47e76b33f43a56ac19aaa (patch)
tree59b442ed480a8b0718431d696fa3281256946e45 /meta/recipes-sato/puzzles
parent3cd0a8c3812915037aebfa37ce53b5aa30198cc8 (diff)
downloadpoky-ec187d35f4a3ff85bdc47e76b33f43a56ac19aaa.tar.gz
puzzles: Zero'ise structs before use
Fixes build failures with musl where gcc5 flags it used before initialized. (From OE-Core rev: dda96dbb3e4cd83fe6b8fd8370c8ca2a737cc078) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-sato/puzzles')
-rw-r--r--meta/recipes-sato/puzzles/files/0001-rect-Fix-compiler-errors-about-uninitialized-use-of-.patch32
-rw-r--r--meta/recipes-sato/puzzles/puzzles_git.bb1
2 files changed, 33 insertions, 0 deletions
diff --git a/meta/recipes-sato/puzzles/files/0001-rect-Fix-compiler-errors-about-uninitialized-use-of-.patch b/meta/recipes-sato/puzzles/files/0001-rect-Fix-compiler-errors-about-uninitialized-use-of-.patch
new file mode 100644
index 0000000000..0b971c432e
--- /dev/null
+++ b/meta/recipes-sato/puzzles/files/0001-rect-Fix-compiler-errors-about-uninitialized-use-of-.patch
@@ -0,0 +1,32 @@
1From 78d6d1706c21ad467520075ff7a8bf15cfbd68b3 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Wed, 30 Dec 2015 22:13:16 +0000
4Subject: [PATCH] rect: Fix compiler errors about uninitialized use of
5 variables
6
7error: 'r2.x' may be used uninitialized in this function
8
9Signed-off-by: Khem Raj <raj.khem@gmail.com>
10---
11Upstream-Status: Submitted
12
13 rect.c | 3 ++-
14 1 file changed, 2 insertions(+), 1 deletion(-)
15
16diff --git a/rect.c b/rect.c
17index 55667c0..fa3a786 100644
18--- a/rect.c
19+++ b/rect.c
20@@ -1317,7 +1317,8 @@ static char *new_game_desc(const game_params *params_in, random_state *rs,
21 if (ndirs > 0) {
22 int which, dir;
23 struct rect r1, r2;
24-
25+ memset(&r1, 0, sizeof(struct rect));
26+ memset(&r2, 0, sizeof(struct rect));
27 which = random_upto(rs, ndirs);
28 dir = dirs[which];
29
30--
312.6.4
32
diff --git a/meta/recipes-sato/puzzles/puzzles_git.bb b/meta/recipes-sato/puzzles/puzzles_git.bb
index 1e3bac7458..9c8170cbdb 100644
--- a/meta/recipes-sato/puzzles/puzzles_git.bb
+++ b/meta/recipes-sato/puzzles/puzzles_git.bb
@@ -12,6 +12,7 @@ LIC_FILES_CHKSUM = "file://LICENCE;md5=33bcd4bce8f3c197f2aefbdbd2d299bc"
12SRC_URI = "git://git.tartarus.org/simon/puzzles.git \ 12SRC_URI = "git://git.tartarus.org/simon/puzzles.git \
13 file://fix-compiling-failure-with-option-g-O.patch \ 13 file://fix-compiling-failure-with-option-g-O.patch \
14 file://0001-Use-labs-instead-of-abs.patch \ 14 file://0001-Use-labs-instead-of-abs.patch \
15 file://0001-rect-Fix-compiler-errors-about-uninitialized-use-of-.patch \
15" 16"
16SRCREV = "346584bf6e38232be8773c24fd7dedcbd7b3d9ed" 17SRCREV = "346584bf6e38232be8773c24fd7dedcbd7b3d9ed"
17PE = "1" 18PE = "1"