diff mbox

[ovs-dev] json: Fix non-static json char lookup table.

Message ID 20161006023339.10807-1-joe@ovn.org
State Accepted
Headers show

Commit Message

Joe Stringer Oct. 6, 2016, 2:33 a.m. UTC
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>
---
 lib/json.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Ben Pfaff Oct. 6, 2016, 2:51 a.m. UTC | #1
On Thu, Oct 06, 2016 at 11:33:39AM +0900, Joe Stringer wrote:
> 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>

I noticed this earlier too and forgot to send a patch.  Thanks!

Acked-by: Ben Pfaff <blp@ovn.org>
Joe Stringer Oct. 6, 2016, 2:59 a.m. UTC | #2
On 6 October 2016 at 11:51, Ben Pfaff <blp@ovn.org> wrote:
> On Thu, Oct 06, 2016 at 11:33:39AM +0900, Joe Stringer wrote:
>> 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>
>
> I noticed this earlier too and forgot to send a patch.  Thanks!
>
> Acked-by: Ben Pfaff <blp@ovn.org>

Thanks, applied to master.
diff mbox

Patch

diff --git a/lib/json.c b/lib/json.c
index e052a6a0af0d..40c8f718db72 100644
--- a/lib/json.c
+++ b/lib/json.c
@@ -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",