summaryrefslogtreecommitdiffstats
path: root/meta/recipes-sato/puzzles/files/0001-malloc-Check-for-excessive-values-to-malloc.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-sato/puzzles/files/0001-malloc-Check-for-excessive-values-to-malloc.patch')
-rw-r--r--meta/recipes-sato/puzzles/files/0001-malloc-Check-for-excessive-values-to-malloc.patch45
1 files changed, 0 insertions, 45 deletions
diff --git a/meta/recipes-sato/puzzles/files/0001-malloc-Check-for-excessive-values-to-malloc.patch b/meta/recipes-sato/puzzles/files/0001-malloc-Check-for-excessive-values-to-malloc.patch
deleted file mode 100644
index b572b55d1c..0000000000
--- a/meta/recipes-sato/puzzles/files/0001-malloc-Check-for-excessive-values-to-malloc.patch
+++ /dev/null
@@ -1,45 +0,0 @@
1tree234: Avoid excessive values to malloc
2
3with whole program optimizers like lto, smalloc() is inlined the excessive
4constant argument is propagated to malloc() and ultimately triggers the warning.
5
6| tmp/work/core2-64-poky-linux/puzzles/2_0.0+gitAUTOINC+640f9235c7-r0/git/tree234.c: In function 'disptree':
7| 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=]
8| 46 | #define smalloc malloc
9| | ^
10| tmp/work/core2-64-poky-linux/puzzles/2_0.0+gitAUTOINC+640f9235c7-r0/git/tree234.c:1631:17: note: in expansion of macro 'smalloc'
11| 1631 | leveldata = smalloc(ht * (width+2));
12| | ^~~~~~~
13| In file included from tmp/work/core2-64-poky-linux/puzzles/2_0.0+gitAUTOINC+640f9235c7-r0/git/tree234.c:29:
14| 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
15| 539 | extern void *malloc (size_t __size) __THROW __attribute_malloc__
16| | ^~~~~~
17| 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=]
18| 46 | #define smalloc malloc
19| | ^
20| tmp/work/core2-64-poky-linux/puzzles/2_0.0+gitAUTOINC+640f9235c7-r0/git/tree234.c:1632:18: note: in expansion of macro 'smalloc'
21| 1632 | ctx.levels = smalloc(ht * sizeof(char *));
22| | ^~~~~~~
23| In file included from tmp/work/core2-64-poky-linux/puzzles/2_0.0+gitAUTOINC+640f9235c7-r0/git/tree234.c:29:
24| 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
25| 539 | extern void *malloc (size_t __size) __THROW __attribute_malloc__
26| | ^~~~~~
27| cc1: some warnings being treated as errors
28
29Upstream-Status: Submitted [email discussion with upstream]
30
31Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
32
33Index: git/tree234.c
34===================================================================
35--- git.orig/tree234.c
36+++ git/tree234.c
37@@ -1621,7 +1621,7 @@ void disptree(tree234 *t) {
38 dispctx ctx;
39 char *leveldata;
40 int width = count234(t);
41- int ht = height234(t) * 3 - 2;
42+ unsigned int ht = height234(t) * 3 - 2;
43 int i;
44
45 if (!t->root) {