dota17
8b162c4b89
clang-format the files
5 years ago
dota17
c117d8a8a8
add the disabling formatting coments and adjust the partial code manuly
5 years ago
dota17
a8cec740f0
add options
5 years ago
dota17
df7833e9a3
clang-format
5 years ago
Eric Haszlakiewicz
ed54353d84
Merge pull request #563 from robybeen/master
Changed order of calloc args to match stdlib
5 years ago
Robert
5d9b8e0fef
Changed order of calloc args to match stdlib (2)
Although it is currently working, it's worth to stick with the stdlib definition to avoid further problems
5 years ago
Robert
56f81811c2
Changed order of calloc args to match stdlib
Although it is currently working, it's worth to stick with the stdlib definition to avoid further problems
5 years ago
Eric Haszlakiewicz
6afcf1606b
Merge pull request #562 from dota17/testcase_add
Bugfix and testcases supplements
5 years ago
dota17
3822177473
add test cases
5 years ago
Chen
c2ba379b03
Merge pull request #561 from dota17/add_badge
add the badge in README.md and test the coveralls
5 years ago
dota17
203bacb24d
add the badge in README.md and test the coveralls
5 years ago
Chen
d1650a582e
Merge pull request #541 from dota17/coveralls_final
add coveralls auto tool to json-c
5 years ago
dota17
541a0b609a
modify the coveralls configuration file
5 years ago
Chen
353ef26bda
Merge pull request #558 from dota17/doc_message_modify
modify the doc target message
5 years ago
dota17
1204a1fded
modify the doc target message
5 years ago
Eric Haszlakiewicz
a06339215e
Merge pull request #556 from Jehan/wip/Jehan/fix-broken-mingw-w64
Fixes various Wreturn-type and Wimplicit-fallthrough errors on Mingw-w64
5 years ago
Jehan
b15e7ba470
Fixes various Wreturn-type and Wimplicit-fallthrough errors on Mingw-w64
This is a recent regression since commit
6359b79847
which added various assert(0)
calls (often replacing return-s).
With Ming-W64 compiler, json-c build was failing with various errors of
the sort:
> /home/jehan/dev/src/json-c/json_object.c: In function 'json_object_int_inc':
> /home/jehan/dev/src/json-c/json_object.c:841:1: error: control reaches end of non-void function [-Werror=return-type]
> 841 | }
> | ^
> In file included from /home/jehan/dev/src/json-c/json_object.c:17:
> /home/jehan/dev/src/json-c/json_object.c: In function 'json_object_get_double':
> /home/jehan/.local/share/crossroad/roads/w64/json-c/include/assert.h:76:4: error: this statement may fall through [-Werror=implicit-fallthrough=]
> 76 | (_assert(#_Expression,__FILE__,__LINE__),0))
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> /home/jehan/dev/src/json-c/json_object.c:1070:7: note: in expansion of macro 'assert'
> 1070 | assert(0);
> | ^~~~~~
> /home/jehan/dev/src/json-c/json_object.c:1072:3: note: here
> 1072 | case json_type_boolean:
> | ^~~~
The problem is that Mingw-w64 does not consider assert() as a noreturn
(even assert(0)), because it has to be compatible by Microsoft
libraries. See the discussion here:
https://sourceforge.net/p/mingw-w64/bugs/306/
Instead let's create a new json_abort() function which is basically just
an abort() function with an optional message, for such cases where
abortion was non-conditional (using assert() and using the assertion
condition as a message here was clearly a misuse of the function). And
mark json_abort() as 'noreturn', as well as 'cold' for optimization
purpose (this is code we expect to never run, unless there is a bug,
that is).
Finally let's use this json_abort() instead of previous misused assert()
calls.
5 years ago
Eric Haszlakiewicz
e94eb90f9f
Merge pull request #546 from dota17/make_unistall
Add uninstall target in cmake
5 years ago
dota17
c14c6caa32
delete -r in uninstall
5 years ago
Eric Haszlakiewicz
a8c9284f06
Merge pull request #547 from dota17/assert_test
modify json-c default build type, and fix up the assert() errors in t…
5 years ago
dota17
0030e905b4
modify RELEASE
5 years ago
dota17
e56ab0146f
update testcase and delete debug -O0 build
5 years ago
Eric Haszlakiewicz
b3296e778f
Follow up the PR#542: improve assert() calls, simplify code in json_object_equal().
5 years ago
Eric Haszlakiewicz
737aee40c4
Merge pull request #542 from dota17/adduint64_final
add uint64 data to json-c
5 years ago
dota17
2d44f865c3
modify json-c default build type, and fix up the assert() errors in testcase
5 years ago
dota17
6359b79847
update json_object.c and testcase, delete json_object_uint_inc()
5 years ago
dota17
9532f94fa4
modify partial functions and testcase, in order to support automatic conversion for int64/uint64
5 years ago
dota17
1160c8625c
Add uninstall target in cmake
5 years ago
dota17
c816de212b
modify the json_object, replace c_int64/c_uint64 with struct{union{int64, uint64},...}
5 years ago
Eric Haszlakiewicz
30e00cf757
Merge pull request #545 from dota17/make_doc
add doc target in cmake
5 years ago
dota17
e3b6521baa
add doc target on cmake
5 years ago
Eric Haszlakiewicz
5a2b9139f9
Merge pull request #544 from dota17/distcheck
Increase distcheck target in cmake
5 years ago
Eric Haszlakiewicz
a0129c9761
Merge pull request #543 from dota17/readme
Readme
5 years ago
dota17
77d7a99c75
Increase distcheck target in cmake
5 years ago
Chen
0ccb296263
Update README.md
5 years ago
dota17
f69fbd897b
Added documentation for camke-configure
5 years ago
dota17
3c3b5920f7
add uint64 data to json-c
5 years ago
dota17
c684b1d40b
add coveralls auto tool to json-c
5 years ago
Eric Haszlakiewicz
518f337ce8
Issue #539 : use a internal-only serializer function in json_object_new_double_s() to avoid potential conflicts with user code that uses the json_object_userdata_to_json_string serializer. Also, document the serializer-resetting behavior of json_object_set_double().
5 years ago
Eric Haszlakiewicz
4bf7ffa984
Issue #539 : be sure to clean up at the end of test_set_value.
5 years ago
Eric Haszlakiewicz
ae13ca524a
Issue #539 : reset the serializer when json_object_set_double() is called and the current serializer is the one that json_object_new_double_s() used.
5 years ago
Eric Haszlakiewicz
0ffdbb2395
Merge pull request #531 from dota17/utf8test
validate utf-8 string
5 years ago
Eric Haszlakiewicz
1934eddf29
Merge pull request #536 from dota17/new_null
add json_object_new_null()
5 years ago
dota17
7ad72b81c5
update comment
5 years ago
dota17
010f33d460
add json_object_new_null
5 years ago
dota17
787a8b3f1c
update code
5 years ago
Eric Haszlakiewicz
360d28b961
Merge pull request #533 from sunpoet/master
Fix "make check"
5 years ago
Po-Chuan Hsieh
bb5971ba2a
Fix make check
cc -DHAVE_CONFIG_H -I. -I.. -I.. -I../tests -O2 -pipe -fstack-protector-strong -fno-strict-aliasing -Wall -Werror -Wcast-qual -Wno-error=deprecated-declarations -Wextra -Wno-unused-parameter -D_GNU_SOURCE -D_REENTRANT -MT test_parse.o -MD -MP -MF .deps/test_parse.Tpo -c -o test_parse.o test_parse.c
test_parse.c:256:14: error: adding 'int' to a string does not append to the string [-Werror,-Wstring-plus-int]
{ "null123" + 4, 4, 3, json_tokener_success, 1 },
~~~~~~~~~~^~~
test_parse.c:256:14: note: use array indexing to silence this warning
{ "null123" + 4, 4, 3, json_tokener_success, 1 },
^
& [ ]
test_parse.c:258:12: error: adding 'int' to a string does not append to the string [-Werror,-Wstring-plus-int]
{ "nullx" + 4, 2, 0, json_tokener_error_parse_unexpected, 1 },
~~~~~~~~^~~
test_parse.c:258:12: note: use array indexing to silence this warning
{ "nullx" + 4, 2, 0, json_tokener_error_parse_unexpected, 1 },
^
& [ ]
test_parse.c:260:25: error: adding 'int' to a string does not append to the string [-Werror,-Wstring-plus-int]
{ "{\"a\":1}{\"b\":2}" + 7,
~~~~~~~~~~~~~~~~~~~~~^~~
test_parse.c:260:25: note: use array indexing to silence this warning
{ "{\"a\":1}{\"b\":2}" + 7,
^
& [ ]
3 errors generated.
*** Error code 1
Stop.
5 years ago
dota17
eca74dcccf
test utf8
5 years ago
Eric Haszlakiewicz
e651e96a5b
Merge pull request #526 from dota17/addTestCase_printbuf
Increased the test coverage of printbuf.c 82% to 92%.
5 years ago