]> git.ipfire.org Git - thirdparty/json-c.git/log
thirdparty/json-c.git
2 years agoMerge pull request #624 from besser82/topic/besser82/json-c-0.14/rdrand_fixes json-c-0.14
Eric Hawicz [Wed, 28 Jun 2023 22:01:39 +0000 (18:01 -0400)] 
Merge pull request #624 from besser82/topic/besser82/json-c-0.14/rdrand_fixes

json-c-0.14: Detect broken RDRAND during initialization.

5 years agoDetect broken RDRAND during initialization. 624/head
Björn Esser [Mon, 25 May 2020 11:03:31 +0000 (13:03 +0200)] 
Detect broken RDRAND during initialization.

Some CPUs advertise RDRAND in CPUID, but return
0xFFFFFFFF unconditionally.  To avoid locking up
later, test RDRAND during initialization, and if
it returns 0xFFFFFFFF, mark it as nonexistent.

Also fix a possible segmentation fault in CPUID check.

This commit is a squashed backport of the following
commits on the master branch:

  * 0e5bbcaa162ac7850eb4fcd8f91391837d0efb50
  * 4d36b0287d3ab0912ba8a4790340ca099960b2b0
  * 80863140263be5f2dc630938ed8f0066f8a1ab43

5 years agoMerge pull request #608 from besser82/topic/besser82/json-c-0.14/CVE-2020-12762
Eric Hawicz [Sat, 16 May 2020 01:02:37 +0000 (21:02 -0400)] 
Merge pull request #608 from besser82/topic/besser82/json-c-0.14/CVE-2020-12762

json-c-0.14: Fix CVE-2020-12762 - json-c through 0.14 has an integer overflow and out-of-bounds write ...

5 years agoFix CVE-2020-12762. 608/head
Björn Esser [Thu, 14 May 2020 10:32:30 +0000 (12:32 +0200)] 
Fix CVE-2020-12762.

This commit is a squashed backport of the following commits
on the master branch:

  * 099016b7e8d70a6d5dd814e788bba08d33d48426
  * 77d935b7ae7871a1940cd827e850e6063044ec45
  * d07b91014986900a3a75f306d302e13e005e9d67
  * 519dfe1591d85432986f9762d41d1a883198c157
  * a59d5acfab4485d5133114df61785b1fc633e0c6
  * 26f080997d41cfdb17beab65e90c82217d0ac43b

5 years agoIssue #585: don't install config.h
Eric Haszlakiewicz [Tue, 21 Apr 2020 01:13:21 +0000 (01:13 +0000)] 
Issue #585: don't install config.h

(cherry picked from commit 8b511c402b73d1d8b195991891c8d44859cb57ec)

5 years agoGenerate docs for the 0.14 release. json-c-0.14-20200419
Eric Haszlakiewicz [Sun, 19 Apr 2020 03:40:50 +0000 (03:40 +0000)] 
Generate docs for the 0.14 release.

5 years agoBump version to 0.14 and shared library version to 5.0.0
Eric Haszlakiewicz [Sun, 19 Apr 2020 03:40:37 +0000 (03:40 +0000)] 
Bump version to 0.14 and shared library version to 5.0.0

5 years agoFill in the ChangeLog for the upcoming 0.14 release.
Eric Haszlakiewicz [Sun, 19 Apr 2020 01:31:48 +0000 (01:31 +0000)] 
Fill in the ChangeLog for the upcoming 0.14 release.

5 years agoFill in a few more pre-release steps to match what we've done for the 0.14 release.
Eric Haszlakiewicz [Sun, 19 Apr 2020 01:28:24 +0000 (01:28 +0000)] 
Fill in a few more pre-release steps to match what we've done for the 0.14 release.
Move the list of contributors to the AUTHORS file.

5 years agoRewrite the issued_closed_for_* files so they display a bit nicer.
Eric Haszlakiewicz [Sat, 18 Apr 2020 03:22:52 +0000 (03:22 +0000)] 
Rewrite the issued_closed_for_* files so they display a bit nicer.

5 years agoExplicitly mark several things in json_tokener deprecated.
Eric Haszlakiewicz [Sat, 18 Apr 2020 02:42:46 +0000 (02:42 +0000)] 
Explicitly mark several things in json_tokener deprecated.

5 years agoRe-do clang-format.
Eric Haszlakiewicz [Sat, 18 Apr 2020 02:14:13 +0000 (02:14 +0000)] 
Re-do clang-format.

5 years agoMake json_abort() internal to json_object.c
Eric Haszlakiewicz [Sat, 18 Apr 2020 02:05:37 +0000 (02:05 +0000)] 
Make json_abort() internal to json_object.c

5 years agoMake json_tokener_validate_utf8() internal to json_tokener.c, and improve the docs...
Eric Haszlakiewicz [Sat, 18 Apr 2020 02:02:06 +0000 (02:02 +0000)] 
Make json_tokener_validate_utf8() internal to json_tokener.c, and improve the docs a bit.

5 years agoMerge pull request #582 from dota17/list_closed_issue_pr
Eric Haszlakiewicz [Fri, 17 Apr 2020 17:32:17 +0000 (13:32 -0400)] 
Merge pull request #582 from dota17/list_closed_issue_pr

add the list of issues& prs closed

5 years agoupdate 582/head
dota17 [Fri, 17 Apr 2020 01:40:24 +0000 (09:40 +0800)] 
update

5 years agomanual adjustment
dota17 [Thu, 16 Apr 2020 08:30:14 +0000 (16:30 +0800)] 
manual adjustment

5 years agoadd the list of issues& prs closed
dota17 [Thu, 16 Apr 2020 08:15:04 +0000 (16:15 +0800)] 
add the list of issues& prs closed

5 years agoMerge pull request #524 from dota17/addTestCase_obj_token
Eric Haszlakiewicz [Thu, 16 Apr 2020 03:35:21 +0000 (23:35 -0400)] 
Merge pull request #524 from dota17/addTestCase_obj_token

Increase coverage

5 years agoMerge pull request #581 from Jehan/wip/Jehan/no-strict-prototypes-windows
Eric Haszlakiewicz [Thu, 16 Apr 2020 03:32:59 +0000 (23:32 -0400)] 
Merge pull request #581 from Jehan/wip/Jehan/no-strict-prototypes-windows

CMakeLists: do not enforce strict prototypes on Windows.

5 years agoremove unsuitable case 524/head
dota17 [Wed, 15 Apr 2020 12:06:12 +0000 (20:06 +0800)] 
remove unsuitable case

5 years agoCMakeLists: do not enforce strict prototypes on Windows. 581/head
Jehan [Wed, 15 Apr 2020 11:01:09 +0000 (13:01 +0200)] 
CMakeLists: do not enforce strict prototypes on Windows.

On Windows, or at least when cross-built with Mingw-w64, build fails
because strict prototype fails on an included file (thus nothing we can
do about in json-c code):

> from /home/jehan/dev/src/json-c/json_util.c:44:
> /home/jehan/.local/share/crossroad/roads/w64/json-c/include/minwindef.h:196:3: error: function declaration isn't a prototype [-Werror=strict-prototypes]
>   196 |   typedef INT_PTR (WINAPI *FARPROC) ();
>       |   ^~~~~~~
> /home/jehan/.local/share/crossroad/roads/w64/json-c/include/minwindef.h:197:3: error: function declaration isn't a prototype [-Werror=strict-prototypes]
>   197 |   typedef INT_PTR (WINAPI *NEARPROC) ();
>       |   ^~~~~~~
> /home/jehan/.local/share/crossroad/roads/w64/json-c/include/minwindef.h:198:3: error: function declaration isn't a prototype [-Werror=strict-prototypes]
>   198 |   typedef INT_PTR (WINAPI *PROC) ();
>       |   ^~~~~~~

Let's just disable the errors for Windows build.

5 years agoMerge pull request #580 from besser82/topic/besser82/fix_cmake_tests
Eric Haszlakiewicz [Tue, 14 Apr 2020 19:17:21 +0000 (15:17 -0400)] 
Merge pull request #580 from besser82/topic/besser82/fix_cmake_tests

Fix CMake tests for enforced strict prototypes.

5 years agoFix CMake tests for enforced strict prototypes. 580/head
Björn Esser [Tue, 14 Apr 2020 18:42:32 +0000 (20:42 +0200)] 
Fix CMake tests for enforced strict prototypes.

5 years agoMerge pull request #527 from dota17/arraylist_test
Eric Haszlakiewicz [Tue, 14 Apr 2020 14:28:16 +0000 (10:28 -0400)] 
Merge pull request #527 from dota17/arraylist_test

Arraylist testcase

5 years agoMerge pull request #579 from besser82/topic/besser82/strict-prototypes
Eric Haszlakiewicz [Tue, 14 Apr 2020 14:25:13 +0000 (10:25 -0400)] 
Merge pull request #579 from besser82/topic/besser82/strict-prototypes

Enforce strict prototypes.

5 years agoclang-format two test_util_file.c and test_object_iterator.c
dota17 [Tue, 14 Apr 2020 02:15:27 +0000 (10:15 +0800)] 
clang-format two test_util_file.c and test_object_iterator.c

5 years agoIncreased the test coverage of json_util.c from 76% to 90.3%.
chenguoping [Fri, 3 Jan 2020 02:17:05 +0000 (10:17 +0800)] 
Increased the test coverage of json_util.c from 76% to 90.3%.

5 years agoIncreased the test coverage of json_object_iterator.c from 0% to 100%
chenguoping [Fri, 3 Jan 2020 02:05:09 +0000 (10:05 +0800)] 
Increased the test coverage of json_object_iterator.c from 0% to 100%

5 years agoclang-format test1.c 527/head
dota17 [Tue, 14 Apr 2020 01:20:51 +0000 (09:20 +0800)] 
clang-format test1.c

5 years agofix valgrind errors
chenguoping [Fri, 3 Jan 2020 08:56:43 +0000 (16:56 +0800)] 
fix valgrind errors

5 years agotestcase for array_list
chenguoping [Thu, 2 Jan 2020 11:30:00 +0000 (19:30 +0800)] 
testcase for array_list

5 years agoEnforce strict prototypes. 579/head
Björn Esser [Mon, 13 Apr 2020 09:29:52 +0000 (11:29 +0200)] 
Enforce strict prototypes.

5 years agoMerge pull request #578 from besser82/topic/besser82/pkgconfig_install
Eric Haszlakiewicz [Mon, 13 Apr 2020 00:52:01 +0000 (20:52 -0400)] 
Merge pull request #578 from besser82/topic/besser82/pkgconfig_install

CMake: Install pkgconfig file in proper location by default

5 years agoCMake: Install pkgconfig file in proper location by default 578/head
Björn Esser [Sun, 12 Apr 2020 17:21:54 +0000 (19:21 +0200)] 
CMake: Install pkgconfig file in proper location by default

The default location for pkconfig files on most systems is:
  ${CMAKE_INSTALL_LIBDIR}/pkgconfig

Thus the file should get installed in there by default.

5 years agoMerge pull request #577 from besser82/topic/besser82/json_c_version_test_verbose_on_fail
Eric Haszlakiewicz [Sun, 12 Apr 2020 02:35:40 +0000 (22:35 -0400)] 
Merge pull request #577 from besser82/topic/besser82/json_c_version_test_verbose_on_fail

Be verbose on failing json_c_version test.

5 years agoBe verbose on failing json_c_version test. 577/head
Björn Esser [Sat, 11 Apr 2020 19:09:31 +0000 (21:09 +0200)] 
Be verbose on failing json_c_version test.

5 years agoMerge pull request #576 from besser82/topic/besser82/increase_coverage
Eric Haszlakiewicz [Sat, 11 Apr 2020 18:45:45 +0000 (14:45 -0400)] 
Merge pull request #576 from besser82/topic/besser82/increase_coverage

Test coverage for json_c_version.

5 years agoMerge pull request #575 from besser82/topic/besser82/cosmetics
Eric Haszlakiewicz [Sat, 11 Apr 2020 18:18:37 +0000 (14:18 -0400)] 
Merge pull request #575 from besser82/topic/besser82/cosmetics

Small cosmetics.

5 years agoTest coverage for json_c_version. 576/head
Björn Esser [Sat, 11 Apr 2020 10:29:36 +0000 (12:29 +0200)] 
Test coverage for json_c_version.

5 years agoRemove multiple trailing newlines at EOF. 575/head
Björn Esser [Sat, 11 Apr 2020 08:34:30 +0000 (10:34 +0200)] 
Remove multiple trailing newlines at EOF.

5 years agogitignore: Add build folder.
Björn Esser [Fri, 10 Apr 2020 11:10:30 +0000 (13:10 +0200)] 
gitignore: Add build folder.

5 years agoClean trailing white-space.
Björn Esser [Fri, 10 Apr 2020 11:06:54 +0000 (13:06 +0200)] 
Clean trailing white-space.

5 years agoFix line terminators to be UNIX.
Björn Esser [Fri, 10 Apr 2020 11:25:41 +0000 (13:25 +0200)] 
Fix line terminators to be UNIX.

5 years agoUpdate README.md to remove autoconf instructions in favor of cmake.
Eric Haszlakiewicz [Sat, 11 Apr 2020 03:24:51 +0000 (03:24 +0000)] 
Update README.md to remove autoconf instructions in favor of cmake.

5 years agoMerge pull request #572 from besser82/topic/besser82/cmake_fixes
Eric Haszlakiewicz [Sat, 11 Apr 2020 02:08:27 +0000 (22:08 -0400)] 
Merge pull request #572 from besser82/topic/besser82/cmake_fixes

Small fixes to CMakeLists

5 years agoMerge pull request #573 from besser82/topic/besser82/coverage
Chen [Sat, 11 Apr 2020 01:31:43 +0000 (09:31 +0800)] 
Merge pull request #573 from besser82/topic/besser82/coverage

Fix coveralls submission.

5 years agoFix coveralls submission. 573/head
Björn Esser [Fri, 10 Apr 2020 13:08:09 +0000 (15:08 +0200)] 
Fix coveralls submission.

coveralls-cpp is dead and does not work anymore.
Fortunately there is coveralls-lcov available.

5 years agoCMake: Check whether BSYMBOLIC is supported by the linker. 572/head
Björn Esser [Fri, 10 Apr 2020 12:42:03 +0000 (14:42 +0200)] 
CMake: Check whether BSYMBOLIC is supported by the linker.

Linking with '-Bsymbolic-functions' is supported for ELF-binaries, only.

5 years agoCMake: Build Doxygen documentation out-of-tree.
Björn Esser [Fri, 10 Apr 2020 12:20:57 +0000 (14:20 +0200)] 
CMake: Build Doxygen documentation out-of-tree.

5 years agoCMake: Fix appending of linker flags.
Björn Esser [Fri, 10 Apr 2020 12:15:52 +0000 (14:15 +0200)] 
CMake: Fix appending of linker flags.

There was a typo in `CMAKE_SHARED_LINKER_FLAGS`.

5 years agoList the set of contributors since the 0.13 branch
Eric Haszlakiewicz [Fri, 10 Apr 2020 02:11:48 +0000 (02:11 +0000)] 
List the set of contributors since the 0.13 branch

5 years agoFix one more assert("!invalid cint_type") to use json_abort(...) instead.
Eric Haszlakiewicz [Fri, 10 Apr 2020 01:26:04 +0000 (01:26 +0000)] 
Fix one more assert("!invalid cint_type") to use json_abort(...) instead.

5 years agoIssue #568: fix the strtoll and strtoull handing so config.h ends up creating defines...
Eric Haszlakiewicz [Thu, 9 Apr 2020 20:58:28 +0000 (20:58 +0000)] 
Issue #568: fix the strtoll and strtoull handing so config.h ends up creating defines for those only when needed, which should exclude mingw environments.

5 years agoRemove autoconf files from .gitignore.
Eric Haszlakiewicz [Thu, 9 Apr 2020 02:55:21 +0000 (02:55 +0000)] 
Remove autoconf files from .gitignore.

5 years agoUpdate the oss-fuzz build script to try to get it to work with cmake.
Eric Haszlakiewicz [Thu, 9 Apr 2020 02:34:59 +0000 (02:34 +0000)] 
Update the oss-fuzz build script to try to get it to work with cmake.

5 years agoRemove autoconf machinery, we're using cmake now. Update the release checklist to...
Eric Haszlakiewicz [Thu, 9 Apr 2020 02:15:31 +0000 (02:15 +0000)] 
Remove autoconf machinery, we're using cmake now.  Update the release checklist to account for that, plus fill in other tasks and clean it up a bit.

5 years agoosx builds also need -DDISABLE_BSYMBOLIC=ON
Eric Haszlakiewicz [Wed, 8 Apr 2020 03:04:27 +0000 (03:04 +0000)] 
osx builds also need -DDISABLE_BSYMBOLIC=ON

5 years agoI have NFC why osx fails when "set -e" is in effect, but leave it off and clean up...
Eric Haszlakiewicz [Wed, 8 Apr 2020 02:54:10 +0000 (02:54 +0000)] 
I have NFC why osx fails when "set -e" is in effect, but leave it off and clean up the rest of the debuging code in the travis config.

5 years agoNot all systems (e.g. osx) have malloc.h, include stdlib.h instead.
Eric Haszlakiewicz [Wed, 8 Apr 2020 02:53:48 +0000 (02:53 +0000)] 
Not all systems (e.g. osx) have malloc.h, include stdlib.h instead.

5 years agoTry yet again to fix the osx build, this time do set +e
Eric Haszlakiewicz [Wed, 8 Apr 2020 02:39:03 +0000 (02:39 +0000)] 
Try yet again to fix the osx build, this time do set +e

5 years agoAnother attempt at debugging the travis osx build, this time just ignore errors.
Eric Haszlakiewicz [Wed, 8 Apr 2020 02:28:02 +0000 (02:28 +0000)] 
Another attempt at debugging the travis osx build, this time just ignore errors.

5 years agoWait a while before exiting travis to allow output to flush.
Eric Haszlakiewicz [Wed, 8 Apr 2020 02:17:14 +0000 (02:17 +0000)] 
Wait a while before exiting travis to allow output to flush.

5 years agoApparently cmake is already installed on travis osx builds. Try another approach...
Eric Haszlakiewicz [Wed, 8 Apr 2020 02:02:25 +0000 (02:02 +0000)] 
Apparently cmake is already installed on travis osx builds.  Try another approach to figure out what was failing.

5 years agoInstall cmake on osx travis builds. s/make check/make test/
Eric Haszlakiewicz [Wed, 8 Apr 2020 01:45:49 +0000 (01:45 +0000)] 
Install cmake on osx travis builds.  s/make check/make test/

5 years agoPerform the travis build in a subdir, so the distcheck target works.
Eric Haszlakiewicz [Wed, 8 Apr 2020 01:34:22 +0000 (01:34 +0000)] 
Perform the travis build in a subdir, so the distcheck target works.

5 years agoSwitch travis to use cmake instead of autoconf.
Eric Haszlakiewicz [Wed, 8 Apr 2020 01:21:11 +0000 (01:21 +0000)] 
Switch travis to use cmake instead of autoconf.

5 years agoAdd includes and split off json_types.h to help ensure that headers can be included...
Eric Haszlakiewicz [Mon, 6 Apr 2020 13:55:27 +0000 (13:55 +0000)] 
Add includes and split off json_types.h to help ensure that headers can be included in any order.

5 years agoDon't let clang-format rearrange Windows includes, since they need to be in a particu...
Eric Haszlakiewicz [Mon, 6 Apr 2020 02:47:34 +0000 (02:47 +0000)] 
Don't let clang-format rearrange Windows includes, since they need to be in a particular order.

5 years agoFormat random_seed.c with clang-format, with key asm sections excluded.
Eric Haszlakiewicz [Mon, 6 Apr 2020 01:52:28 +0000 (01:52 +0000)] 
Format random_seed.c with clang-format, with key asm sections excluded.

5 years agoUpdate the style guide to mention that we're using clang-format now.
Eric Haszlakiewicz [Mon, 6 Apr 2020 01:49:14 +0000 (01:49 +0000)] 
Update the style guide to mention that we're using clang-format now.

5 years agoMerge pull request #555 from dota17/chang_format_3
Eric Haszlakiewicz [Fri, 3 Apr 2020 04:13:34 +0000 (00:13 -0400)] 
Merge pull request #555 from dota17/chang_format_3

Format json-c with clang-format tool

5 years agoclang-format the files 555/head
dota17 [Sat, 28 Mar 2020 02:25:00 +0000 (10:25 +0800)] 
clang-format the files

5 years agoadd the disabling formatting coments and adjust the partial code manuly
dota17 [Fri, 27 Mar 2020 05:04:50 +0000 (13:04 +0800)] 
add the disabling formatting coments and adjust the partial code manuly

5 years agoadd options
dota17 [Tue, 10 Mar 2020 07:47:53 +0000 (15:47 +0800)] 
add options

5 years agoclang-format
dota17 [Fri, 6 Mar 2020 09:15:05 +0000 (17:15 +0800)] 
clang-format

5 years agoMerge pull request #563 from robybeen/master
Eric Haszlakiewicz [Fri, 3 Apr 2020 02:35:21 +0000 (22:35 -0400)] 
Merge pull request #563 from robybeen/master

Changed order of calloc args to match stdlib

5 years agoChanged order of calloc args to match stdlib (2) 563/head
Robert [Thu, 2 Apr 2020 17:28:55 +0000 (19:28 +0200)] 
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 agoChanged order of calloc args to match stdlib
Robert [Thu, 2 Apr 2020 17:23:10 +0000 (19:23 +0200)] 
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 agoMerge pull request #562 from dota17/testcase_add
Eric Haszlakiewicz [Thu, 2 Apr 2020 15:23:39 +0000 (11:23 -0400)] 
Merge pull request #562 from dota17/testcase_add

Bugfix and testcases supplements

5 years agoadd test cases 562/head
dota17 [Mon, 30 Mar 2020 09:32:06 +0000 (17:32 +0800)] 
add test cases

5 years agoMerge pull request #561 from dota17/add_badge
Chen [Tue, 31 Mar 2020 02:54:45 +0000 (10:54 +0800)] 
Merge pull request #561 from dota17/add_badge

add the badge in README.md and test the coveralls

5 years agoadd the badge in README.md and test the coveralls 561/head
dota17 [Mon, 30 Mar 2020 07:43:50 +0000 (15:43 +0800)] 
add the badge in README.md and test the coveralls

5 years agoMerge pull request #541 from dota17/coveralls_final
Chen [Sat, 28 Mar 2020 02:42:17 +0000 (10:42 +0800)] 
Merge pull request #541 from dota17/coveralls_final

add coveralls auto tool to json-c

5 years agomodify the coveralls configuration file 541/head
dota17 [Wed, 19 Feb 2020 10:13:28 +0000 (18:13 +0800)] 
modify the coveralls configuration file

5 years agoMerge pull request #558 from dota17/doc_message_modify
Chen [Fri, 20 Mar 2020 03:17:20 +0000 (11:17 +0800)] 
Merge pull request #558 from dota17/doc_message_modify

modify the doc target message

5 years agomodify the doc target message 558/head
dota17 [Thu, 19 Mar 2020 02:23:29 +0000 (10:23 +0800)] 
modify the doc target message

5 years agoMerge pull request #556 from Jehan/wip/Jehan/fix-broken-mingw-w64
Eric Haszlakiewicz [Tue, 17 Mar 2020 02:24:14 +0000 (21:24 -0500)] 
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 agoFixes various Wreturn-type and Wimplicit-fallthrough errors on Mingw-w64 556/head
Jehan [Sun, 15 Mar 2020 22:29:37 +0000 (23:29 +0100)] 
Fixes various Wreturn-type and Wimplicit-fallthrough errors on Mingw-w64

This is a recent regression since commit
6359b798479d379a3202e02c6a938d9b40c0d856 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 agoMerge pull request #546 from dota17/make_unistall
Eric Haszlakiewicz [Wed, 11 Mar 2020 03:12:13 +0000 (22:12 -0500)] 
Merge pull request #546 from dota17/make_unistall

Add uninstall target in cmake

5 years agodelete -r in uninstall 546/head
dota17 [Wed, 11 Mar 2020 02:47:04 +0000 (10:47 +0800)] 
delete -r in uninstall

5 years agoMerge pull request #547 from dota17/assert_test
Eric Haszlakiewicz [Tue, 3 Mar 2020 13:54:21 +0000 (07:54 -0600)] 
Merge pull request #547 from dota17/assert_test

modify json-c default build type, and fix up the assert() errors in t…

5 years agomodify RELEASE 547/head
dota17 [Tue, 3 Mar 2020 06:16:13 +0000 (14:16 +0800)] 
modify RELEASE

5 years agoupdate testcase and delete debug -O0 build
dota17 [Mon, 2 Mar 2020 12:19:35 +0000 (20:19 +0800)] 
update testcase and delete debug -O0 build

5 years agoFollow up the PR#542: improve assert() calls, simplify code in json_object_equal().
Eric Haszlakiewicz [Mon, 2 Mar 2020 02:08:49 +0000 (02:08 +0000)] 
Follow up the PR#542: improve assert() calls, simplify code in json_object_equal().

5 years agoMerge pull request #542 from dota17/adduint64_final
Eric Haszlakiewicz [Sun, 1 Mar 2020 13:51:26 +0000 (08:51 -0500)] 
Merge pull request #542 from dota17/adduint64_final

add uint64 data to json-c

5 years agomodify json-c default build type, and fix up the assert() errors in testcase
dota17 [Sat, 29 Feb 2020 07:32:42 +0000 (15:32 +0800)] 
modify json-c default build type, and fix up the assert() errors in testcase

5 years agoupdate json_object.c and testcase, delete json_object_uint_inc() 542/head
dota17 [Fri, 28 Feb 2020 03:18:48 +0000 (11:18 +0800)] 
update json_object.c and testcase, delete json_object_uint_inc()

5 years agomodify partial functions and testcase, in order to support automatic conversion for...
dota17 [Thu, 27 Feb 2020 07:01:06 +0000 (15:01 +0800)] 
modify partial functions and testcase, in order to support automatic conversion for int64/uint64

5 years agoAdd uninstall target in cmake
dota17 [Thu, 27 Feb 2020 08:00:09 +0000 (16:00 +0800)] 
Add uninstall target in cmake