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 | 68 |
1 files changed, 0 insertions, 68 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 143e898a51..0000000000 --- a/meta/recipes-sato/puzzles/files/0001-palisade-Fix-warnings-with-clang-on-arm.patch +++ /dev/null | |||
@@ -1,68 +0,0 @@ | |||
1 | From 453587d714473b806473b309727f865b673cbc06 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Wed, 13 Jan 2016 23:10:19 -0800 | ||
4 | Subject: [PATCH] palisade: Fix warnings with clang on arm | ||
5 | |||
6 | ARM treats 'char' as unsigned char when 'char' is not qualified with | ||
7 | 'signed' or 'unsigned' explicitly. | ||
8 | |||
9 | This results in warnings e.g. | ||
10 | |||
11 | palisade.c:531:22: error: comparison of constant -1 with expression of | ||
12 | type 'clue' (aka 'char') is always false | ||
13 | [-Werror,-Wtautological-constant-out-of-range-compare] | ||
14 | if (clues[i] == EMPTY) continue; | ||
15 | |||
16 | Therefore, typcast the contant to char in such places to be explicit | ||
17 | |||
18 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
19 | Upstream-Status: Submitted | ||
20 | --- | ||
21 | palisade.c | 10 +++++----- | ||
22 | 1 file changed, 5 insertions(+), 5 deletions(-) | ||
23 | |||
24 | diff --git a/palisade.c b/palisade.c | ||
25 | index 6ffbf2d..8b54d42 100644 | ||
26 | --- a/palisade.c | ||
27 | +++ b/palisade.c | ||
28 | @@ -304,11 +304,11 @@ static void solver_connected_clues_versus_region_size(solver_ctx *ctx) | ||
29 | * If p = q = 3 then the region has size exactly 2. */ | ||
30 | |||
31 | for (i = 0; i < wh; ++i) { | ||
32 | - if (ctx->clues[i] == EMPTY) continue; | ||
33 | + if (ctx->clues[i] == (char)EMPTY) continue; | ||
34 | for (dir = 0; dir < 4; ++dir) { | ||
35 | int j = i + dx[dir] + w*dy[dir]; | ||
36 | if (disconnected(ctx, i, j, dir)) continue; | ||
37 | - if (ctx->clues[j] == EMPTY) continue; | ||
38 | + if (ctx->clues[j] == (char)EMPTY) continue; | ||
39 | if ((8 - ctx->clues[i] - ctx->clues[j] > ctx->params->k) || | ||
40 | (ctx->clues[i] == 3 && ctx->clues[j] == 3 && | ||
41 | ctx->params->k != 2)) | ||
42 | @@ -326,7 +326,7 @@ static bool solver_number_exhausted(solver_ctx *ctx) | ||
43 | bool changed = false; | ||
44 | |||
45 | for (i = 0; i < wh; ++i) { | ||
46 | - if (ctx->clues[i] == EMPTY) continue; | ||
47 | + if (ctx->clues[i] == (char)EMPTY) continue; | ||
48 | |||
49 | if (bitcount[(ctx->borders[i] & BORDER_MASK)] == ctx->clues[i]) { | ||
50 | for (dir = 0; dir < 4; ++dir) { | ||
51 | @@ -538,7 +538,7 @@ static bool is_solved(const game_params *params, clue *clues, | ||
52 | for (i = 0; i < wh; ++i) { | ||
53 | if (dsf[i] == UNVISITED) dfs_dsf(i, params->w, border, dsf, true); | ||
54 | if (dsf_size(dsf, i) != k) goto error; | ||
55 | - if (clues[i] == EMPTY) continue; | ||
56 | + if (clues[i] == (char)EMPTY) continue; | ||
57 | if (clues[i] != bitcount[border[i] & BORDER_MASK]) goto error; | ||
58 | } | ||
59 | |||
60 | @@ -685,7 +685,7 @@ static char *new_game_desc(const game_params *params, random_state *rs, | ||
61 | p = numbers; | ||
62 | r = 0; | ||
63 | for (i = 0; i < wh; ++i) { | ||
64 | - if (numbers[i] != EMPTY) { | ||
65 | + if (numbers[i] != (char)EMPTY) { | ||
66 | while (r) { | ||
67 | while (r > 26) { | ||
68 | *p++ = 'z'; | ||