diff options
Diffstat (limited to 'meta/recipes-sato/puzzles/files/0001-Clarify-conditions-to-avoid-compiler-errors.patch')
| -rw-r--r-- | meta/recipes-sato/puzzles/files/0001-Clarify-conditions-to-avoid-compiler-errors.patch | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/meta/recipes-sato/puzzles/files/0001-Clarify-conditions-to-avoid-compiler-errors.patch b/meta/recipes-sato/puzzles/files/0001-Clarify-conditions-to-avoid-compiler-errors.patch new file mode 100644 index 0000000000..89aa1587c1 --- /dev/null +++ b/meta/recipes-sato/puzzles/files/0001-Clarify-conditions-to-avoid-compiler-errors.patch | |||
| @@ -0,0 +1,48 @@ | |||
| 1 | From 72f2e9043ef509992dfa61791638db87bf0ae37b Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Tue, 6 Dec 2016 01:20:00 +0000 | ||
| 4 | Subject: [PATCH] Clarify conditions to avoid compiler errors | ||
| 5 | |||
| 6 | Fix errors pointed out by clang | ||
| 7 | |||
| 8 | error: logical not is only applied to the left hand side of this bitwise operator [-Werror,-Wlogical-not-parentheses] | ||
| 9 | | if (only_immutable && !copy->flags[i] & FLAG_IMMUTABLE) continue; | ||
| 10 | | ^ | ||
| 11 | |||
| 12 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 13 | --- | ||
| 14 | Upstream-Status: Submitted | ||
| 15 | |||
| 16 | signpost.c | 2 +- | ||
| 17 | tracks.c | 2 +- | ||
| 18 | 2 files changed, 2 insertions(+), 2 deletions(-) | ||
| 19 | |||
| 20 | diff --git a/signpost.c b/signpost.c | ||
| 21 | index aa2e13a..2e2dff2 100644 | ||
| 22 | --- a/signpost.c | ||
| 23 | +++ b/signpost.c | ||
| 24 | @@ -284,7 +284,7 @@ static int check_nums(game_state *orig, game_state *copy, int only_immutable) | ||
| 25 | int i, ret = 1; | ||
| 26 | assert(copy->n == orig->n); | ||
| 27 | for (i = 0; i < copy->n; i++) { | ||
| 28 | - if (only_immutable && !copy->flags[i] & FLAG_IMMUTABLE) continue; | ||
| 29 | + if (only_immutable && !(copy->flags[i] & FLAG_IMMUTABLE)) continue; | ||
| 30 | assert(copy->nums[i] >= 0); | ||
| 31 | assert(copy->nums[i] <= copy->n); | ||
| 32 | if (copy->nums[i] != orig->nums[i]) { | ||
| 33 | diff --git a/tracks.c b/tracks.c | ||
| 34 | index 5b27350..ca44ce1 100644 | ||
| 35 | --- a/tracks.c | ||
| 36 | +++ b/tracks.c | ||
| 37 | @@ -1072,7 +1072,7 @@ static int solve_check_single_sub(game_state *state, int si, int id, int n, | ||
| 38 | x = i%w; | ||
| 39 | y = i/w; | ||
| 40 | if (abs(ox-x) > 1 || abs(oy-y) > 1) { | ||
| 41 | - if (!state->sflags[i] & S_TRACK) | ||
| 42 | + if (!(state->sflags[i] & S_TRACK)) | ||
| 43 | did += solve_set_sflag(state, x, y, S_NOTRACK, what); | ||
| 44 | } | ||
| 45 | } | ||
| 46 | -- | ||
| 47 | 1.9.1 | ||
| 48 | |||
