diff options
Diffstat (limited to 'meta/recipes-sato/puzzles/files/0001-palisade-Fix-warnings-with-clang-on-arm.patch')
-rw-r--r-- | meta/recipes-sato/puzzles/files/0001-palisade-Fix-warnings-with-clang-on-arm.patch | 72 |
1 files changed, 0 insertions, 72 deletions
diff --git a/meta/recipes-sato/puzzles/files/0001-palisade-Fix-warnings-with-clang-on-arm.patch b/meta/recipes-sato/puzzles/files/0001-palisade-Fix-warnings-with-clang-on-arm.patch deleted file mode 100644 index 07eb1d32f6..0000000000 --- a/meta/recipes-sato/puzzles/files/0001-palisade-Fix-warnings-with-clang-on-arm.patch +++ /dev/null | |||
@@ -1,72 +0,0 @@ | |||
1 | From: Khem Raj <raj.khem@gmail.com> | ||
2 | |||
3 | palisade: Fix warnings with clang on arm | ||
4 | |||
5 | ARM treats 'char' as unsigned char when 'char' is not qualified with | ||
6 | 'signed' or 'unsigned' explicitly. | ||
7 | |||
8 | This results in warnings e.g. | ||
9 | |||
10 | palisade.c:531:22: error: comparison of constant -1 with expression of | ||
11 | type 'clue' (aka 'char') is always false | ||
12 | [-Werror,-Wtautological-constant-out-of-range-compare] | ||
13 | if (clues[i] == EMPTY) continue; | ||
14 | |||
15 | Therefore, typcast the contant to char in such places to be explicit | ||
16 | |||
17 | Upstream-Status: Submitted [email discussion with upstream] | ||
18 | |||
19 | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> | ||
20 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
21 | |||
22 | Index: git/palisade.c | ||
23 | =================================================================== | ||
24 | --- git.orig/palisade.c | ||
25 | +++ git/palisade.c | ||
26 | @@ -46,7 +46,7 @@ struct game_params { | ||
27 | int w, h, k; | ||
28 | }; | ||
29 | |||
30 | -typedef char clue; | ||
31 | +typedef signed char clue; | ||
32 | typedef unsigned char borderflag; | ||
33 | |||
34 | typedef struct shared_state { | ||
35 | @@ -242,7 +242,7 @@ typedef struct solver_ctx { | ||
36 | * thing is done. See how it is propagated across multiple squares.] | ||
37 | */ | ||
38 | |||
39 | -#define EMPTY (~0) | ||
40 | +#define EMPTY ((clue)-1) | ||
41 | |||
42 | #define BIT(i) (1 << (i)) | ||
43 | #define BORDER(i) BIT(i) | ||
44 | @@ -622,7 +622,7 @@ static char *new_game_desc(const game_pa | ||
45 | { | ||
46 | int w = params->w, h = params->h, wh = w*h, k = params->k; | ||
47 | |||
48 | - clue *numbers = snewn(wh + 1, clue), *p; | ||
49 | + clue *numbers = snewn(wh + 1, clue); | ||
50 | borderflag *rim = snewn(wh, borderflag); | ||
51 | borderflag *scratch_borders = snewn(wh, borderflag); | ||
52 | |||
53 | @@ -682,7 +682,8 @@ static char *new_game_desc(const game_pa | ||
54 | sfree(shuf); | ||
55 | sfree(dsf); | ||
56 | |||
57 | - p = numbers; | ||
58 | + char *output = snewn(wh + 1, char), *p = output; | ||
59 | + | ||
60 | r = 0; | ||
61 | for (i = 0; i < wh; ++i) { | ||
62 | if (numbers[i] != EMPTY) { | ||
63 | @@ -699,7 +700,8 @@ static char *new_game_desc(const game_pa | ||
64 | } | ||
65 | *p++ = '\0'; | ||
66 | |||
67 | - return sresize(numbers, p - numbers, clue); | ||
68 | + sfree(numbers); | ||
69 | + return sresize(output, p - output, char); | ||
70 | } | ||
71 | |||
72 | static const char *validate_desc(const game_params *params, const char *desc) | ||