summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-extended
diff options
context:
space:
mode:
authorChen Qi <Qi.Chen@windriver.com>2018-07-31 17:27:23 +0800
committerKhem Raj <raj.khem@gmail.com>2018-08-02 11:23:02 -0700
commita74abf155d7bd6c873fd72b76369c09e5c68031c (patch)
tree77a71ea2b70272e71217bba91485d9bebd866938 /meta-oe/recipes-extended
parent4338cf346d6f3b56227df1497135e7153acb8a75 (diff)
downloadmeta-openembedded-a74abf155d7bd6c873fd72b76369c09e5c68031c.tar.gz
libfastjson: backport patch to fix compilation error
I've met the following compilation error. | ../git/json_object.c:415:3: error: jump skips variable initialization [-Werror=jump-misses-init] Backport a patch to fix it. Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe/recipes-extended')
-rw-r--r--meta-oe/recipes-extended/rsyslog/libfastjson/0001-fix-jump-misses-init-gcc-8-warning.patch46
-rw-r--r--meta-oe/recipes-extended/rsyslog/libfastjson_0.99.8.bb3
2 files changed, 48 insertions, 1 deletions
diff --git a/meta-oe/recipes-extended/rsyslog/libfastjson/0001-fix-jump-misses-init-gcc-8-warning.patch b/meta-oe/recipes-extended/rsyslog/libfastjson/0001-fix-jump-misses-init-gcc-8-warning.patch
new file mode 100644
index 000000000..25e5efa4b
--- /dev/null
+++ b/meta-oe/recipes-extended/rsyslog/libfastjson/0001-fix-jump-misses-init-gcc-8-warning.patch
@@ -0,0 +1,46 @@
1From d697182f18a421b7f80ea9de4914251b55d82532 Mon Sep 17 00:00:00 2001
2From: Rainer Gerhards <rgerhards@adiscon.com>
3Date: Sun, 15 Jul 2018 17:24:59 +0200
4Subject: [PATCH] "fix" "jump-misses-init" gcc-8 warning
5
6Actually, that warning is overly conservative, and so we
7have changed the code in a somewhat suboptimal way to "fix"
8it. In this spots, it's not that bad and we wanted to avoid
9totally disabling this warning.
10
11If it were more costly in terms of cleanness, we would probaly
12have done that. Just mention it to tell anyone else the
13cure is not really a good one, just selected due to the
14circumstances in this special case.
15
16Upstream-Status: Backport
17
18Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
19---
20 json_object.c | 3 ++-
21 1 file changed, 2 insertions(+), 1 deletion(-)
22
23diff --git a/json_object.c b/json_object.c
24index 35338e1..6e67891 100644
25--- a/json_object.c
26+++ b/json_object.c
27@@ -396,6 +396,7 @@ fjson_child_get_empty_etry(struct fjson_object *const __restrict__ jso)
28 {
29 struct _fjson_child *chld = NULL;
30 struct _fjson_child_pg *pg;
31+ int pg_idx;
32
33 if (jso->o.c_obj.ndeleted > 0) {
34 /* we first fill deleted spots */
35@@ -415,7 +416,7 @@ fjson_child_get_empty_etry(struct fjson_object *const __restrict__ jso)
36 goto done;
37 }
38
39- const int pg_idx = jso->o.c_obj.nelem % FJSON_OBJECT_CHLD_PG_SIZE;
40+ pg_idx = jso->o.c_obj.nelem % FJSON_OBJECT_CHLD_PG_SIZE;
41 if (jso->o.c_obj.nelem > 0 && pg_idx == 0) {
42 if((pg = calloc(1, sizeof(struct _fjson_child_pg))) == NULL) {
43 errno = ENOMEM;
44--
452.11.0
46
diff --git a/meta-oe/recipes-extended/rsyslog/libfastjson_0.99.8.bb b/meta-oe/recipes-extended/rsyslog/libfastjson_0.99.8.bb
index ea089de84..b84dde3d3 100644
--- a/meta-oe/recipes-extended/rsyslog/libfastjson_0.99.8.bb
+++ b/meta-oe/recipes-extended/rsyslog/libfastjson_0.99.8.bb
@@ -6,7 +6,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=a958bb07122368f3e1d9b2efe07d231f"
6 6
7DEPENDS = "" 7DEPENDS = ""
8 8
9SRC_URI = "git://github.com/rsyslog/libfastjson.git;protocol=https" 9SRC_URI = "git://github.com/rsyslog/libfastjson.git;protocol=https \
10 file://0001-fix-jump-misses-init-gcc-8-warning.patch"
10 11
11SRCREV = "4758b1caf69ada911ef79e1d80793fe489b98dff" 12SRCREV = "4758b1caf69ada911ef79e1d80793fe489b98dff"
12 13