summaryrefslogtreecommitdiffstats
path: root/meta/recipes-sato
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2019-03-07 22:02:16 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-03-09 14:41:20 +0000
commit67ccdb8fd87edb7c12790d25e8722a09b13b8351 (patch)
tree42630d604d2866509b2ac00fc828d24b18f9e3bb /meta/recipes-sato
parent277162917331b235863eec31cbe82c101f0e4efe (diff)
downloadopenembedded-core-67ccdb8fd87edb7c12790d25e8722a09b13b8351.tar.gz
openembedded-core-67ccdb8fd87edb7c12790d25e8722a09b13b8351.tar.bz2
openembedded-core-67ccdb8fd87edb7c12790d25e8722a09b13b8351.zip
puzzles: Fix build with gcc9 on risc-v
Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-sato')
-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 @@
+From 035467aa0abfbc0de7e5d24543d4aab37301593c Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 7 Mar 2019 21:56:57 -0800
+Subject: [PATCH] pattern.c: Change string lenght parameter to be size_t in
+ do_row()
+
+This fixes below error on some architectures e.g. RISC-V
+
+pattern.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); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ pattern.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/pattern.c b/pattern.c
+index 45b1b0c..f73a4c2 100644
+--- a/pattern.c
++++ b/pattern.c
+@@ -428,7 +428,7 @@ static int do_row(unsigned char *known, unsigned char *deduced,
+ unsigned char *row,
+ unsigned char *minpos_done, unsigned char *maxpos_done,
+ unsigned char *minpos_ok, unsigned char *maxpos_ok,
+- unsigned char *start, int len, int step, int *data,
++ unsigned char *start, size_t len, int step, int *data,
+ unsigned int *changed
+ #ifdef STANDALONE_SOLVER
+ , const char *rowcol, int index, int cluewid
+--
+2.21.0
+
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 \
file://0001-Use-labs-instead-of-abs.patch \
file://0001-palisade-Fix-warnings-with-clang-on-arm.patch \
file://0001-Use-Wno-error-format-overflow-if-the-compiler-suppor.patch \
+ file://0001-pattern.c-Change-string-lenght-parameter-to-be-size_.patch \
"
UPSTREAM_CHECK_COMMITS = "1"