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 @@ -From: Khem Raj <raj.khem@gmail.com> - -palisade: Fix warnings with clang on arm - -ARM treats 'char' as unsigned char when 'char' is not qualified with -'signed' or 'unsigned' explicitly. - -This results in warnings e.g. - -palisade.c:531:22: error: comparison of constant -1 with expression of -type 'clue' (aka 'char') is always false -[-Werror,-Wtautological-constant-out-of-range-compare] - if (clues[i] == EMPTY) continue; - -Therefore, typcast the contant to char in such places to be explicit - -Upstream-Status: Submitted [email discussion with upstream] - -Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> -Signed-off-by: Khem Raj <raj.khem@gmail.com> - -Index: git/palisade.c -=================================================================== ---- git.orig/palisade.c -+++ git/palisade.c -@@ -46,7 +46,7 @@ struct game_params { - int w, h, k; - }; - --typedef char clue; -+typedef signed char clue; - typedef unsigned char borderflag; - - typedef struct shared_state { -@@ -242,7 +242,7 @@ typedef struct solver_ctx { - * thing is done. See how it is propagated across multiple squares.] - */ - --#define EMPTY (~0) -+#define EMPTY ((clue)-1) - - #define BIT(i) (1 << (i)) - #define BORDER(i) BIT(i) -@@ -622,7 +622,7 @@ static char *new_game_desc(const game_pa - { - int w = params->w, h = params->h, wh = w*h, k = params->k; - -- clue *numbers = snewn(wh + 1, clue), *p; -+ clue *numbers = snewn(wh + 1, clue); - borderflag *rim = snewn(wh, borderflag); - borderflag *scratch_borders = snewn(wh, borderflag); - -@@ -682,7 +682,8 @@ static char *new_game_desc(const game_pa - sfree(shuf); - sfree(dsf); - -- p = numbers; -+ char *output = snewn(wh + 1, char), *p = output; -+ - r = 0; - for (i = 0; i < wh; ++i) { - if (numbers[i] != EMPTY) { -@@ -699,7 +700,8 @@ static char *new_game_desc(const game_pa - } - *p++ = '\0'; - -- return sresize(numbers, p - numbers, clue); -+ sfree(numbers); -+ return sresize(output, p - output, char); - } - - static const char *validate_desc(const game_params *params, const char *desc) |