Skip to contentSkip to conversation

puzzles: Upgrade to latest git with patches merged

PATCH New Richard Purdie 1 participant 1 message Dec 11, 2021

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 puzzles: Upgrade to latest git with patches merged

This upgrades to the latest upstream version where our fixes have equivalent fixes merged upstream so our patches are no longer needed.

---
 ...Check-for-excessive-values-to-malloc.patch | 45 ------------
 ...01-map-Fix-stringop-overflow-warning.patch | 34 ---------
 ...isade-Fix-warnings-with-clang-on-arm.patch | 72 -------------------
 ...-string-lenght-parameter-to-be-size_.patch | 30 --------
 ...ix-compiling-failure-with-option-g-O.patch | 33 ---------
 .../puzzles/files/fix-ki-uninitialized.patch  | 32 ---------
 meta/recipes-sato/puzzles/puzzles_git.bb      | 11 +--
 7 files changed, 2 insertions(+), 255 deletions(-)
 delete mode 100644 meta/recipes-sato/puzzles/files/0001-malloc-Check-for-excessive-values-to-malloc.patch
 delete mode 100644 meta/recipes-sato/puzzles/files/0001-map-Fix-stringop-overflow-warning.patch
 delete mode 100644 meta/recipes-sato/puzzles/files/0001-palisade-Fix-warnings-with-clang-on-arm.patch
 delete mode 100644 meta/recipes-sato/puzzles/files/0001-pattern.c-Change-string-lenght-parameter-to-be-size_.patch
 delete mode 100644 meta/recipes-sato/puzzles/files/fix-compiling-failure-with-option-g-O.patch
 delete mode 100644 meta/recipes-sato/puzzles/files/fix-ki-uninitialized.patch
meta/recipes-sato/puzzles/files/0001-malloc-Check-for-excessive-values-to-malloc.patch deleted +0 -45
deleted file mode 100644
index b572b55d1cf..00000000000
@@ -1,45 +0,0 @@
-tree234: Avoid excessive values to malloc
-
-with whole program optimizers like lto, smalloc() is inlined the excessive
-constant argument is propagated to malloc() and ultimately triggers the warning.
-
-| tmp/work/core2-64-poky-linux/puzzles/2_0.0+gitAUTOINC+640f9235c7-r0/git/tree234.c: In function 'disptree':
-| tmp/work/core2-64-poky-linux/puzzles/2_0.0+gitAUTOINC+640f9235c7-r0/git/tree234.c:46:17: error: argument 1 value '18446744073709551612' exceeds maximum object size 9223372036854775807 [-Werror=alloc-size-larger-than=]
-|    46 | #define smalloc malloc
-|       |                 ^
-| tmp/work/core2-64-poky-linux/puzzles/2_0.0+gitAUTOINC+640f9235c7-r0/git/tree234.c:1631:17: note: in expansion of macro 'smalloc'
-|  1631 |     leveldata = smalloc(ht * (width+2));
-|       |                 ^~~~~~~
-| In file included from tmp/work/core2-64-poky-linux/puzzles/2_0.0+gitAUTOINC+640f9235c7-r0/git/tree234.c:29:
-| tmp/work/core2-64-poky-linux/puzzles/2_0.0+gitAUTOINC+640f9235c7-r0/recipe-sysroot/usr/include/stdlib.h:539:14: note: in a call to allocation function 'malloc' declared here
-|   539 | extern void *malloc (size_t __size) __THROW __attribute_malloc__
-|       |              ^~~~~~
-| tmp/work/core2-64-poky-linux/puzzles/2_0.0+gitAUTOINC+640f9235c7-r0/git/tree234.c:46:17: error: argument 1 value '18446744073709551600' exceeds maximum object size 9223372036854775807 [-Werror=alloc-size-larger-than=]
-|    46 | #define smalloc malloc
-|       |                 ^
-| tmp/work/core2-64-poky-linux/puzzles/2_0.0+gitAUTOINC+640f9235c7-r0/git/tree234.c:1632:18: note: in expansion of macro 'smalloc'
-|  1632 |     ctx.levels = smalloc(ht * sizeof(char *));
-|       |                  ^~~~~~~
-| In file included from tmp/work/core2-64-poky-linux/puzzles/2_0.0+gitAUTOINC+640f9235c7-r0/git/tree234.c:29:
-| tmp/work/core2-64-poky-linux/puzzles/2_0.0+gitAUTOINC+640f9235c7-r0/recipe-sysroot/usr/include/stdlib.h:539:14: note: in a call to allocation function 'malloc' declared here
-|   539 | extern void *malloc (size_t __size) __THROW __attribute_malloc__
-|       |              ^~~~~~
-| cc1: some warnings being treated as errors
-
-Upstream-Status: Submitted [email discussion with upstream]
-
-Signed-off-by: Richard Purdie <[email protected]>
-
-Index: git/tree234.c
-===================================================================
---- git.orig/tree234.c
-+++ git/tree234.c
-@@ -1621,7 +1621,7 @@ void disptree(tree234 *t) {
-     dispctx ctx;
-     char *leveldata;
-     int width = count234(t);
--    int ht = height234(t) * 3 - 2;
-+    unsigned int ht = height234(t) * 3 - 2;
-     int i;
- 
-     if (!t->root) {
meta/recipes-sato/puzzles/files/0001-map-Fix-stringop-overflow-warning.patch deleted +0 -34
deleted file mode 100644
index 7f46d3ec0eb..00000000000
@@ -1,34 +0,0 @@
-From: Khem Raj <[email protected]>
-map: Fix stringop-overflow warning
-
-Fixes
-
-../git/map.c: In function 'new_game_desc':
-../git/map.c:1663:23: error: writing 1 byte into a region of size 0 [-Werror=stringop-overflow=]
- 1663 |         ret[retlen++] = ',';
-      |         ~~~~~~~~~~~~~~^~~~~
-../git/./map.c: In function 'new_game_desc':
-../git/./map.c:1663:23: error: writing 1 byte into a region of size 0 [-Werror=stringop-overflow=]
- 1663 |         ret[retlen++] = ',';
-      |         ~~~~~~~~~~~~~~^~~~~
-
-Upstream-Status: Submitted [email discussion with upstream]
-
-Signed-off-by: Richard Purdie <[email protected]>
-Signed-off-by: Khem Raj <[email protected]>
-
-Index: git/map.c
-===================================================================
---- git.orig/map.c
-+++ git/map.c
-@@ -1659,6 +1659,10 @@ static char *new_game_desc(const game_pa
- 	    }
- 	}
- 
-+        if (retlen + 10 >= retsize) {
-+            retsize = retlen + 256;
-+            ret = sresize(ret, retsize, char);
-+        }
- 	ret[retlen++] = 'a'-1 + run;
- 	ret[retlen++] = ',';
- 
meta/recipes-sato/puzzles/files/0001-palisade-Fix-warnings-with-clang-on-arm.patch deleted +0 -72

72 lines not on this page · raw message

meta/recipes-sato/puzzles/files/0001-pattern.c-Change-string-lenght-parameter-to-be-size_.patch deleted +0 -30
deleted file mode 100644
index 5e240bfea57..00000000000
@@ -1,30 +0,0 @@
-From: Khem Raj <[email protected]>
-
-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: Submitted [email discussion with upstream]
-
-Signed-off-by: Richard Purdie <[email protected]>
-Signed-off-by: Khem Raj <[email protected]>
-
----
- pattern.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-Index: git/pattern.c
-===================================================================
---- git.orig/pattern.c
-+++ git/pattern.c
-@@ -429,7 +429,7 @@ static bool do_row(unsigned char *known,
-                    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
meta/recipes-sato/puzzles/files/fix-compiling-failure-with-option-g-O.patch deleted +0 -33
deleted file mode 100644
index 4ee75431667..00000000000
@@ -1,33 +0,0 @@
-From: Hongxu Jia <[email protected]>
-
-gtk.c: fix compiling failure with option -g -O
-
-There was a compile failure with option -g -O
-...
-././gtk.c: In function 'main':
-././gtk.c:2911:6: error: 'error' may be used uninitialized in this function [-Werror=maybe-uninitialized]
-      fprintf(stderr, "%s: %s\n", pname, error);
-      ^
-cc1: all warnings being treated as errors
-...
-
-Fix by initializing pointer 'error' with NULL
-
-Upstream-Status: Submitted [email discussion with upstream]
-
-Signed-off-by: Richard Purdie <[email protected]>
-Signed-off-by: Hongxu Jia <[email protected]>
-
-Index: git/gtk.c
-===================================================================
---- git.orig/gtk.c
-+++ git/gtk.c
-@@ -3578,7 +3578,7 @@ static void list_presets_from_menu(struc
- int main(int argc, char **argv)
- {
-     char *pname = argv[0];
--    char *error;
-+    char *error = NULL;
-     int ngenerate = 0, px = 1, py = 1;
-     bool print = false;
-     bool time_generation = false, test_solve = false, list_presets = false;
meta/recipes-sato/puzzles/files/fix-ki-uninitialized.patch deleted +0 -32
deleted file mode 100644
index b182240240b..00000000000
@@ -1,32 +0,0 @@
-tree123: avoid compiler unitialized variable error
-
-The compiler does not realize that we must go through the while()
-loop at least once, so we replace it with a for() loop.
-
-Upstream-Status: Submitted [email discussion with upstream]
-
-Signed-off-by: Richard Purdie <[email protected]>
-Signed-off-by: Joe Slater <[email protected]>
-
-Index: git/tree234.c
-===================================================================
---- git.orig/tree234.c
-+++ git/tree234.c
-@@ -335,7 +335,7 @@ static void *add234_internal(tree234 *t,
-     }
- 
-     n = t->root;
--    while (n) {
-+    do {
- 	LOG(("  node %p: %p/%d \"%s\" %p/%d \"%s\" %p/%d \"%s\" %p/%d\n",
- 	     n,
- 	     n->kids[0], n->counts[0], n->elems[0],
-@@ -388,7 +388,7 @@ static void *add234_internal(tree234 *t,
- 	if (!n->kids[ki])
- 	    break;
- 	n = n->kids[ki];
--    }
-+    } while (n);
- 
-     add234_insert(NULL, e, NULL, &t->root, n, ki);
- 
meta/recipes-sato/puzzles/puzzles_git.bb +2 -9
index 8ac62d52e57..f2fe7d7b969 100644
@@ -7,17 +7,10 @@ LIC_FILES_CHKSUM = "file://LICENCE;md5=6e7d24cf1c949887ee9447a1e2a4a24c"
 # gtk support includes a bunch of x11 headers
 REQUIRED_DISTRO_FEATURES = "x11"
 
-SRC_URI = "git://git.tartarus.org/simon/puzzles.git;branch=main \
-           file://fix-compiling-failure-with-option-g-O.patch \
-           file://0001-palisade-Fix-warnings-with-clang-on-arm.patch \
-           file://0001-pattern.c-Change-string-lenght-parameter-to-be-size_.patch \
-           file://fix-ki-uninitialized.patch \
-           file://0001-malloc-Check-for-excessive-values-to-malloc.patch \
-           file://0001-map-Fix-stringop-overflow-warning.patch \
-           "
+SRC_URI = "git://git.tartarus.org/simon/puzzles.git;branch=main"
 
 UPSTREAM_CHECK_COMMITS = "1"
-SRCREV = "640f9235c79cdb1a924b0148cb312b0f02253364"
+SRCREV = "b56c994b721f7cb5c5bcf09c5d695d4ae07d3052"
 PE = "2"
 PV = "0.0+git${SRCPV}"
 
Signature · 1 line
2.32.0