]> git.proxmox.com Git - mirror_ovs.git/commitdiff
json: Fix non-static json char lookup table.
authorJoe Stringer <joe@ovn.org>
Thu, 6 Oct 2016 02:33:39 +0000 (11:33 +0900)
committerJoe Stringer <joe@ovn.org>
Thu, 6 Oct 2016 02:57:53 +0000 (11:57 +0900)
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: 644ecb10a661 ("json: Serialize strings using a lookup table")
Signed-off-by: Joe Stringer <joe@ovn.org>
Acked-by: Ben Pfaff <blp@ovn.org>
lib/json.c

index e052a6a0af0d1773411e33dfece92955f3f61732..40c8f718db720a1089fda3931562db039c6afdcc 100644 (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",