summaryrefslogtreecommitdiffstats
path: root/meta/recipes-sato/puzzles
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2016-12-08 18:57:59 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-12-13 22:55:20 +0000
commit2f945fd8b32c5ebb9dbe3a72a85a6a35bc97149b (patch)
tree452a9db72255ca1108e1ac3936c29ac41094c631 /meta/recipes-sato/puzzles
parent46f66b5e5d93ad84f3b7dd087e52565ebfc220ed (diff)
downloadpoky-2f945fd8b32c5ebb9dbe3a72a85a6a35bc97149b.tar.gz
puzzles: Upgrade and fix with clang
Delete upstreamed patches (From OE-Core rev: 908570a0da4bf755eb06fed817676c26351ab375) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.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-Clarify-conditions-to-avoid-compiler-errors.patch48
-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.bb4
3 files changed, 50 insertions, 34 deletions
diff --git a/meta/recipes-sato/puzzles/files/0001-Clarify-conditions-to-avoid-compiler-errors.patch b/meta/recipes-sato/puzzles/files/0001-Clarify-conditions-to-avoid-compiler-errors.patch
new file mode 100644
index 0000000000..89aa1587c1
--- /dev/null
+++ b/meta/recipes-sato/puzzles/files/0001-Clarify-conditions-to-avoid-compiler-errors.patch
@@ -0,0 +1,48 @@
1From 72f2e9043ef509992dfa61791638db87bf0ae37b Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Tue, 6 Dec 2016 01:20:00 +0000
4Subject: [PATCH] Clarify conditions to avoid compiler errors
5
6Fix errors pointed out by clang
7
8error: logical not is only applied to the left hand side of this bitwise operator [-Werror,-Wlogical-not-parentheses]
9| if (only_immutable && !copy->flags[i] & FLAG_IMMUTABLE) continue;
10| ^
11
12Signed-off-by: Khem Raj <raj.khem@gmail.com>
13---
14Upstream-Status: Submitted
15
16 signpost.c | 2 +-
17 tracks.c | 2 +-
18 2 files changed, 2 insertions(+), 2 deletions(-)
19
20diff --git a/signpost.c b/signpost.c
21index aa2e13a..2e2dff2 100644
22--- a/signpost.c
23+++ b/signpost.c
24@@ -284,7 +284,7 @@ static int check_nums(game_state *orig, game_state *copy, int only_immutable)
25 int i, ret = 1;
26 assert(copy->n == orig->n);
27 for (i = 0; i < copy->n; i++) {
28- if (only_immutable && !copy->flags[i] & FLAG_IMMUTABLE) continue;
29+ if (only_immutable && !(copy->flags[i] & FLAG_IMMUTABLE)) continue;
30 assert(copy->nums[i] >= 0);
31 assert(copy->nums[i] <= copy->n);
32 if (copy->nums[i] != orig->nums[i]) {
33diff --git a/tracks.c b/tracks.c
34index 5b27350..ca44ce1 100644
35--- a/tracks.c
36+++ b/tracks.c
37@@ -1072,7 +1072,7 @@ static int solve_check_single_sub(game_state *state, int si, int id, int n,
38 x = i%w;
39 y = i/w;
40 if (abs(ox-x) > 1 || abs(oy-y) > 1) {
41- if (!state->sflags[i] & S_TRACK)
42+ if (!(state->sflags[i] & S_TRACK))
43 did += solve_set_sflag(state, x, y, S_NOTRACK, what);
44 }
45 }
46--
471.9.1
48
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
deleted file mode 100644
index 0b971c432e..0000000000
--- a/meta/recipes-sato/puzzles/files/0001-rect-Fix-compiler-errors-about-uninitialized-use-of-.patch
+++ /dev/null
@@ -1,32 +0,0 @@
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 20b98891bb..a25c00760a 100644
--- a/meta/recipes-sato/puzzles/puzzles_git.bb
+++ b/meta/recipes-sato/puzzles/puzzles_git.bb
@@ -12,10 +12,10 @@ 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 \
16 file://0001-palisade-Fix-warnings-with-clang-on-arm.patch \ 15 file://0001-palisade-Fix-warnings-with-clang-on-arm.patch \
16 file://0001-Clarify-conditions-to-avoid-compiler-errors.patch \
17" 17"
18SRCREV = "346584bf6e38232be8773c24fd7dedcbd7b3d9ed" 18SRCREV = "8dfe5cec31e784e4ece2955ecc8cc35ee7e8fbb3"
19PE = "1" 19PE = "1"
20PV = "0.0+git${SRCPV}" 20PV = "0.0+git${SRCPV}"
21 21