Bump to json-c 0.12.1 64/155864/1
authorDongHun Kwak <dh0128.kwak@samsung.com>
Mon, 16 Oct 2017 10:28:49 +0000 (19:28 +0900)
committerDongHun Kwak <dh0128.kwak@samsung.com>
Mon, 16 Oct 2017 10:30:38 +0000 (19:30 +0900)
[Model] All
[BinType] AP
[Customer] OPEN

[Issue#] N/A
[Request] N/A
[Occurrence Version] N/A

[Problem] N/A
[Cause & Measure] json-c 0.12 -> 0.12.1
[Checking Method]

[Team] Open Source Management and Setting Part
[Developer] dh0128.kwak
[Solution company] Samsung
[Change Type] N/A

Change-Id: I9bf8d7498ef39575acdee0082466a919115f5110
Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
Makefile.am.inc
Makefile.in
json_object.c
json_object.h
json_tokener.c
linkhash.c
packaging/json-c.spec
tests/Makefile.in
tests/test_parse.c
tests/test_parse.expected

index 61db1d2..9f14c29 100644 (file)
@@ -1,2 +1,2 @@
-AM_CFLAGS = -Wall -Wno-error=deprecated-declarations -Wextra -Wwrite-strings -Wno-unused-parameter -std=gnu99 -D_GNU_SOURCE -D_REENTRANT
+AM_CFLAGS = -Wall -Werror -Wno-error=deprecated-declarations -Wextra -Wwrite-strings -Wno-unused-but-set-variable -Wno-unused-parameter -std=gnu99 -D_GNU_SOURCE -D_REENTRANT
 
index aa80697..b4493b5 100644 (file)
@@ -389,7 +389,7 @@ target_alias = @target_alias@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
-AM_CFLAGS = -Wall -Wno-error=deprecated-declarations -Wextra -Wwrite-strings -Wno-unused-parameter -std=gnu99 -D_GNU_SOURCE -D_REENTRANT
+AM_CFLAGS = -Wall -Werror -Wno-error=deprecated-declarations -Wextra -Wwrite-strings -Wno-unused-parameter -std=gnu99 -D_GNU_SOURCE -D_REENTRANT
 EXTRA_DIST = README.html README-WIN32.html config.h.win32 doc json-c.vcproj
 SUBDIRS = . tests
 lib_LTLIBRARIES = libjson-c.la 
index 2de4581..6cc73bc 100644 (file)
@@ -203,7 +203,7 @@ int json_object_is_type(struct json_object *jso, enum json_type type)
   return (jso->o_type == type);
 }
 
-enum json_type _json_object_get_type(struct json_object *jso)
+enum json_type json_object_get_type(struct json_object *jso)
 {
   if (!jso)
     return json_type_null;
index 996ff24..8105fe4 100644 (file)
@@ -156,7 +156,6 @@ extern int json_object_is_type(struct json_object *obj, enum json_type type);
      json_type_array,
      json_type_string,
  */
-#define json_object_get_type _json_object_get_type
 extern enum json_type json_object_get_type(struct json_object *obj);
 
 
index 611db5a..decbb65 100644 (file)
@@ -535,7 +535,7 @@ struct json_object* json_tokener_parse_ex(struct json_tokener *tok,
 
          /* Handle a 4-byte sequence, or two sequences if a surrogate pair */
          while(1) {
-           if( c && strchr(json_hex_chars, c)) {
+           if(strchr(json_hex_chars, c)) {
              tok->ucs_char += ((unsigned int)hexdigit(c) << ((3-tok->st_pos++)*4));
              if(tok->st_pos == 4) {
                unsigned char unescaped_utf[4];
@@ -566,8 +566,8 @@ struct json_object* json_tokener_parse_ex(struct json_tokener *tok,
                    */
                   got_hi_surrogate = tok->ucs_char;
                   /* Not at end, and the next two chars should be "\u" */
-                  if ((len == -1 || len > (tok->char_offset + 2)) &&
-                      // str[0] != '0' &&  // implied by json_hex_chars, above. 
+                  if ((tok->char_offset+1 != len) &&
+                      (tok->char_offset+2 != len) &&
                       (str[1] == '\\') &&
                       (str[2] == 'u'))
                   {
index f2b99ec..cb0636b 100644 (file)
@@ -262,7 +262,7 @@ static uint32_t hashlittle( const void *key, size_t length, uint32_t initval)
      * still catch it and complain.  The masking trick does make the hash
      * noticably faster for short strings (like English words).
      */
-#if !defined(VALGRIND) && !defined(__SANITIZE_ADDRESS__)
+#ifndef VALGRIND
 
     switch(length)
     {
index 099bb3b..b7be8c6 100644 (file)
@@ -1,10 +1,10 @@
-%if "%{run_tests}" == "1" 
+%if "%{run_tests}" == "1"
     %define check %%check
 %endif
 
 
 Name:           json-c
-Version:        0.12
+Version:        0.12.1
 Release:        0
 License:        MIT
 Summary:        JSON implementation in C
@@ -48,8 +48,7 @@ cp %{SOURCE1001} .
 %__make -j1
 
 %check
-chmod +x run_test.sh
-sh -c "%__make check || exit 0"
+%__make check || exit 0
 
 %install
 %make_install
index 877b990..dac63b8 100644 (file)
@@ -554,7 +554,7 @@ target_alias = @target_alias@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
-AM_CFLAGS = -Wall -Wno-error=deprecated-declarations -Wextra -Wwrite-strings -Wno-unused-parameter -std=gnu99 -D_GNU_SOURCE -D_REENTRANT
+AM_CFLAGS = -Wall -Werror -Wno-error=deprecated-declarations -Wextra -Wwrite-strings -Wno-unused-parameter -std=gnu99 -D_GNU_SOURCE -D_REENTRANT
 LDADD = $(LIBJSON_LA)
 LIBJSON_LA = $(top_builddir)/libjson-c.la
 TESTS = test1.test test2.test test4.test testReplaceExisting.test \
index 03048a7..8808d0f 100644 (file)
@@ -43,11 +43,6 @@ static void test_basic_parse()
        printf("new_obj.to_string()=%s\n", json_object_to_json_string(new_obj));
        json_object_put(new_obj);
 
-       // Test with a "short" high surrogate 
-       new_obj = json_tokener_parse("[9,'\\uDAD");
-       printf("new_obj.to_string()=%s\n", json_object_to_json_string(new_obj));
-       json_object_put(new_obj);
-
        new_obj = json_tokener_parse("null");
        printf("new_obj.to_string()=%s\n", json_object_to_json_string(new_obj));
        json_object_put(new_obj);
index 148c489..d49cbbb 100644 (file)
@@ -3,7 +3,6 @@ new_obj.to_string()="foo"
 new_obj.to_string()="foo"
 new_obj.to_string()="ABC"
 new_obj.to_string()=null
-new_obj.to_string()=null
 new_obj.to_string()=NaN
 new_obj.to_string()=null
 new_obj.to_string()=null