diff options
-rw-r--r-- | meta/recipes-devtools/json-c/json-c/0001-Add-FALLTHRU-comment-to-handle-GCC7-warnings.patch | 77 | ||||
-rw-r--r-- | meta/recipes-devtools/json-c/json-c_0.12.bb | 1 |
2 files changed, 78 insertions, 0 deletions
diff --git a/meta/recipes-devtools/json-c/json-c/0001-Add-FALLTHRU-comment-to-handle-GCC7-warnings.patch b/meta/recipes-devtools/json-c/json-c/0001-Add-FALLTHRU-comment-to-handle-GCC7-warnings.patch new file mode 100644 index 0000000000..df3b6002aa --- /dev/null +++ b/meta/recipes-devtools/json-c/json-c/0001-Add-FALLTHRU-comment-to-handle-GCC7-warnings.patch | |||
@@ -0,0 +1,77 @@ | |||
1 | From 9522ac8e5d5b20a472f3ffc356d388d36f7f582c Mon Sep 17 00:00:00 2001 | ||
2 | From: marxin <mliska@suse.cz> | ||
3 | Date: Tue, 21 Mar 2017 08:42:11 +0100 | ||
4 | Subject: [PATCH] Add FALLTHRU comment to handle GCC7 warnings. | ||
5 | MIME-Version: 1.0 | ||
6 | Content-Type: text/plain; charset=UTF-8 | ||
7 | Content-Transfer-Encoding: 8bit | ||
8 | |||
9 | --- | ||
10 | Upstream-Status: Backport [https://github.com/json-c/json-c/commit/014924ba899f659917bb64392bbff7d3c803afc2] | ||
11 | Signed-off-by: André Draszik <adraszik@tycoint.com> | ||
12 | |||
13 | json_object.c | 1 + | ||
14 | json_tokener.c | 1 + | ||
15 | linkhash.c | 22 +++++++++++----------- | ||
16 | 3 files changed, 13 insertions(+), 11 deletions(-) | ||
17 | |||
18 | diff --git a/json_object.c b/json_object.c | ||
19 | index 6cc73bc..77e8b21 100644 | ||
20 | --- a/json_object.c | ||
21 | +++ b/json_object.c | ||
22 | @@ -552,6 +552,7 @@ int64_t json_object_get_int64(struct json_object *jso) | ||
23 | return jso->o.c_boolean; | ||
24 | case json_type_string: | ||
25 | if (json_parse_int64(jso->o.c_string.str, &cint) == 0) return cint; | ||
26 | + /* FALLTHRU */ | ||
27 | default: | ||
28 | return 0; | ||
29 | } | ||
30 | diff --git a/json_tokener.c b/json_tokener.c | ||
31 | index 7fa32ae..b32d657 100644 | ||
32 | --- a/json_tokener.c | ||
33 | +++ b/json_tokener.c | ||
34 | @@ -306,6 +306,7 @@ struct json_object* json_tokener_parse_ex(struct json_tokener *tok, | ||
35 | tok->err = json_tokener_error_parse_unexpected; | ||
36 | goto out; | ||
37 | } | ||
38 | + /* FALLTHRU */ | ||
39 | case '"': | ||
40 | state = json_tokener_state_string; | ||
41 | printbuf_reset(tok->pb); | ||
42 | diff --git a/linkhash.c b/linkhash.c | ||
43 | index 712c387..74e3b0f 100644 | ||
44 | --- a/linkhash.c | ||
45 | +++ b/linkhash.c | ||
46 | @@ -376,17 +376,17 @@ static uint32_t hashlittle( const void *key, size_t length, uint32_t initval) | ||
47 | /*-------------------------------- last block: affect all 32 bits of (c) */ | ||
48 | switch(length) /* all the case statements fall through */ | ||
49 | { | ||
50 | - case 12: c+=((uint32_t)k[11])<<24; | ||
51 | - case 11: c+=((uint32_t)k[10])<<16; | ||
52 | - case 10: c+=((uint32_t)k[9])<<8; | ||
53 | - case 9 : c+=k[8]; | ||
54 | - case 8 : b+=((uint32_t)k[7])<<24; | ||
55 | - case 7 : b+=((uint32_t)k[6])<<16; | ||
56 | - case 6 : b+=((uint32_t)k[5])<<8; | ||
57 | - case 5 : b+=k[4]; | ||
58 | - case 4 : a+=((uint32_t)k[3])<<24; | ||
59 | - case 3 : a+=((uint32_t)k[2])<<16; | ||
60 | - case 2 : a+=((uint32_t)k[1])<<8; | ||
61 | + case 12: c+=((uint32_t)k[11])<<24; /* FALLTHRU */ | ||
62 | + case 11: c+=((uint32_t)k[10])<<16; /* FALLTHRU */ | ||
63 | + case 10: c+=((uint32_t)k[9])<<8; /* FALLTHRU */ | ||
64 | + case 9 : c+=k[8]; /* FALLTHRU */ | ||
65 | + case 8 : b+=((uint32_t)k[7])<<24; /* FALLTHRU */ | ||
66 | + case 7 : b+=((uint32_t)k[6])<<16; /* FALLTHRU */ | ||
67 | + case 6 : b+=((uint32_t)k[5])<<8; /* FALLTHRU */ | ||
68 | + case 5 : b+=k[4]; /* FALLTHRU */ | ||
69 | + case 4 : a+=((uint32_t)k[3])<<24; /* FALLTHRU */ | ||
70 | + case 3 : a+=((uint32_t)k[2])<<16; /* FALLTHRU */ | ||
71 | + case 2 : a+=((uint32_t)k[1])<<8; /* FALLTHRU */ | ||
72 | case 1 : a+=k[0]; | ||
73 | break; | ||
74 | case 0 : return c; | ||
75 | -- | ||
76 | 2.14.1 | ||
77 | |||
diff --git a/meta/recipes-devtools/json-c/json-c_0.12.bb b/meta/recipes-devtools/json-c/json-c_0.12.bb index a15455c9bf..072c092c0e 100644 --- a/meta/recipes-devtools/json-c/json-c_0.12.bb +++ b/meta/recipes-devtools/json-c/json-c_0.12.bb | |||
@@ -7,6 +7,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=de54b60fbbc35123ba193fea8ee216f2" | |||
7 | SRC_URI = "https://s3.amazonaws.com/json-c_releases/releases/${BP}.tar.gz \ | 7 | SRC_URI = "https://s3.amazonaws.com/json-c_releases/releases/${BP}.tar.gz \ |
8 | file://0001-json_tokener-requires-INF-and-NAN.patch \ | 8 | file://0001-json_tokener-requires-INF-and-NAN.patch \ |
9 | file://0001-Link-against-libm-when-needed.patch \ | 9 | file://0001-Link-against-libm-when-needed.patch \ |
10 | file://0001-Add-FALLTHRU-comment-to-handle-GCC7-warnings.patch \ | ||
10 | " | 11 | " |
11 | 12 | ||
12 | SRC_URI[md5sum] = "3ca4bbb881dfc4017e8021b5e0a8c491" | 13 | SRC_URI[md5sum] = "3ca4bbb881dfc4017e8021b5e0a8c491" |