summaryrefslogtreecommitdiffstats
path: root/meta/recipes-sato/puzzles
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-sato/puzzles')
-rw-r--r--meta/recipes-sato/puzzles/files/0001-pattern.c-Change-string-lenght-parameter-to-be-size_.patch33
-rw-r--r--meta/recipes-sato/puzzles/puzzles_git.bb1
2 files changed, 34 insertions, 0 deletions
diff --git a/meta/recipes-sato/puzzles/files/0001-pattern.c-Change-string-lenght-parameter-to-be-size_.patch b/meta/recipes-sato/puzzles/files/0001-pattern.c-Change-string-lenght-parameter-to-be-size_.patch
new file mode 100644
index 0000000000..9ac62015d8
--- /dev/null
+++ b/meta/recipes-sato/puzzles/files/0001-pattern.c-Change-string-lenght-parameter-to-be-size_.patch
@@ -0,0 +1,33 @@
1From 035467aa0abfbc0de7e5d24543d4aab37301593c Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Thu, 7 Mar 2019 21:56:57 -0800
4Subject: [PATCH] pattern.c: Change string lenght parameter to be size_t in
5 do_row()
6
7This fixes below error on some architectures e.g. RISC-V
8
9pattern.c:455:9: error: 'memset' specified size between 18446744071562067968 and 18446744073709551615 exceeds maximum object size 9223372036854775807 [-Werror=stringop-overflow=] 455 | memset(deduced, DOT, (size_t)len); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
10
11Upstream-Status: Pending
12
13Signed-off-by: Khem Raj <raj.khem@gmail.com>
14---
15 pattern.c | 2 +-
16 1 file changed, 1 insertion(+), 1 deletion(-)
17
18diff --git a/pattern.c b/pattern.c
19index 45b1b0c..f73a4c2 100644
20--- a/pattern.c
21+++ b/pattern.c
22@@ -428,7 +428,7 @@ static int do_row(unsigned char *known, unsigned char *deduced,
23 unsigned char *row,
24 unsigned char *minpos_done, unsigned char *maxpos_done,
25 unsigned char *minpos_ok, unsigned char *maxpos_ok,
26- unsigned char *start, int len, int step, int *data,
27+ unsigned char *start, size_t len, int step, int *data,
28 unsigned int *changed
29 #ifdef STANDALONE_SOLVER
30 , const char *rowcol, int index, int cluewid
31--
322.21.0
33
diff --git a/meta/recipes-sato/puzzles/puzzles_git.bb b/meta/recipes-sato/puzzles/puzzles_git.bb
index 7d08b964f8..0766bd4ff1 100644
--- a/meta/recipes-sato/puzzles/puzzles_git.bb
+++ b/meta/recipes-sato/puzzles/puzzles_git.bb
@@ -13,6 +13,7 @@ SRC_URI = "git://git.tartarus.org/simon/puzzles.git \
13 file://0001-Use-labs-instead-of-abs.patch \ 13 file://0001-Use-labs-instead-of-abs.patch \
14 file://0001-palisade-Fix-warnings-with-clang-on-arm.patch \ 14 file://0001-palisade-Fix-warnings-with-clang-on-arm.patch \
15 file://0001-Use-Wno-error-format-overflow-if-the-compiler-suppor.patch \ 15 file://0001-Use-Wno-error-format-overflow-if-the-compiler-suppor.patch \
16 file://0001-pattern.c-Change-string-lenght-parameter-to-be-size_.patch \
16 " 17 "
17 18
18UPSTREAM_CHECK_COMMITS = "1" 19UPSTREAM_CHECK_COMMITS = "1"