diff options
author | Chen Qi <Qi.Chen@windriver.com> | 2018-07-31 12:27:23 +0300 |
---|---|---|
committer | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2018-09-25 15:18:16 +0300 |
commit | 82fbb3933f86323bc5633df016fb06e622a9e333 (patch) | |
tree | ded6000563ae3e9154619a040fc66600f1e7d4a4 /meta-openembedded/meta-oe/recipes-extended/rsyslog/libfastjson | |
parent | 5771b916af0dfcff45bfd4de23093a26b8cedf8f (diff) | |
download | openbmc-82fbb3933f86323bc5633df016fb06e622a9e333.tar.xz |
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.
(From meta-openembedded rev: a74abf155d7bd6c873fd72b76369c09e5c68031c)
Change-Id: I90a18e76838721cf8a77c7def0ee08e9e40c8359
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'meta-openembedded/meta-oe/recipes-extended/rsyslog/libfastjson')
-rw-r--r-- | meta-openembedded/meta-oe/recipes-extended/rsyslog/libfastjson/0001-fix-jump-misses-init-gcc-8-warning.patch | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/meta-openembedded/meta-oe/recipes-extended/rsyslog/libfastjson/0001-fix-jump-misses-init-gcc-8-warning.patch b/meta-openembedded/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-openembedded/meta-oe/recipes-extended/rsyslog/libfastjson/0001-fix-jump-misses-init-gcc-8-warning.patch @@ -0,0 +1,46 @@ +From d697182f18a421b7f80ea9de4914251b55d82532 Mon Sep 17 00:00:00 2001 +From: Rainer Gerhards <rgerhards@adiscon.com> +Date: Sun, 15 Jul 2018 17:24:59 +0200 +Subject: [PATCH] "fix" "jump-misses-init" gcc-8 warning + +Actually, that warning is overly conservative, and so we +have changed the code in a somewhat suboptimal way to "fix" +it. In this spots, it's not that bad and we wanted to avoid +totally disabling this warning. + +If it were more costly in terms of cleanness, we would probaly +have done that. Just mention it to tell anyone else the +cure is not really a good one, just selected due to the +circumstances in this special case. + +Upstream-Status: Backport + +Signed-off-by: Chen Qi <Qi.Chen@windriver.com> +--- + json_object.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/json_object.c b/json_object.c +index 35338e1..6e67891 100644 +--- a/json_object.c ++++ b/json_object.c +@@ -396,6 +396,7 @@ fjson_child_get_empty_etry(struct fjson_object *const __restrict__ jso) + { + struct _fjson_child *chld = NULL; + struct _fjson_child_pg *pg; ++ int pg_idx; + + if (jso->o.c_obj.ndeleted > 0) { + /* we first fill deleted spots */ +@@ -415,7 +416,7 @@ fjson_child_get_empty_etry(struct fjson_object *const __restrict__ jso) + goto done; + } + +- const int pg_idx = jso->o.c_obj.nelem % FJSON_OBJECT_CHLD_PG_SIZE; ++ pg_idx = jso->o.c_obj.nelem % FJSON_OBJECT_CHLD_PG_SIZE; + if (jso->o.c_obj.nelem > 0 && pg_idx == 0) { + if((pg = calloc(1, sizeof(struct _fjson_child_pg))) == NULL) { + errno = ENOMEM; +-- +2.11.0 + |