2
0
mirror of https://github.com/openvswitch/ovs synced 2025-09-05 08:45:23 +00:00

json: Fix non-static json char lookup table.

This warning breaks the build on travis:
lib/json.c:1627:12: error: symbol 'chars_escaping' was not declared.
Should it be static?

CC: Esteban Rodriguez Betancourt <estebarb@hpe.com>
Reported-At: https://travis-ci.org/openvswitch/ovs/jobs/165300417
Fixes: 644ecb10a6 ("json: Serialize strings using a lookup table")
Signed-off-by: Joe Stringer <joe@ovn.org>
Acked-by: Ben Pfaff <blp@ovn.org>
This commit is contained in:
Joe Stringer
2016-10-06 11:33:39 +09:00
parent 9797069ad9
commit 7dd9c9a220

View File

@@ -1624,7 +1624,7 @@ json_serialize_array(const struct json_array *array, struct json_serializer *s)
ds_put_char(ds, ']');
}
const char *chars_escaping[256] = {
static const char *chars_escaping[256] = {
"\\u0000", "\\u0001", "\\u0002", "\\u0003", "\\u0004", "\\u0005", "\\u0006", "\\u0007",
"\\b", "\\t", "\\n", "\\u000b", "\\f", "\\r", "\\u000e", "\\u000f",
"\\u0010", "\\u0011", "\\u0012", "\\u0013", "\\u0014", "\\u0015", "\\u0016", "\\u0017",