Commit Graph

30 Commits

Author SHA1 Message Date
Earle Lowe
1059f9a96d jsoncpp: Fix compilation on HP-UX 11.31 ia64 with GCC 4.9.3
In particular, fix the `isfinite` definition.
2019-09-20 10:30:01 -04:00
Zsolt Parragi
4fe34b2d29 Fixing warnings generated by clang 8.0 on Windows
* Deprecation removals previously specific to MSVC/Intel now also used
  by clang
* String literals were assigned to non const pointers. These are stored
  in mutable arrays now
* An implicit function pointer to pointer conversion is a Microsoft
  extension warning is suppressed by an explicit reinterpret_cast
* The MSVC specific deprecation macro for jsoncpp was moved after the
  clang macro to avoid redefinition warnings. This is consistent with
  how jsoncpp fixed the issue in 36d8cfd7
2019-05-29 18:18:09 +02:00
Brad King
d9d285c5ad jsoncpp: Fix include order for build within CMake
Include the KWSys `Configure.h` header first to get its large file
support definitions before including system headers.
2019-02-25 08:26:20 -05:00
Brad King
1699f5c231 Utilities: Suppress warnings in third-party code when using XLClang 2019-02-25 08:26:17 -05:00
Brad King
214fcefa52 Remove now-unused code once used for MIPSpro on IRIX
In commit beb991110d (Remove now-unused code once used on IRIX,
2019-01-11, v3.14.0-rc1~167^2) we removed remnants of IRIX support.
Also remove remnants of MIPSpro compiler support.
2019-02-21 11:12:51 -05:00
Brad King
5751a09092 jsoncpp: fix signed overflow when parsing negative value
Clang's ubsan (-fsanitize=undefined) reports:

    runtime error: negation of -9223372036854775808 cannot be represented in
    type 'Json::Value::LargestInt' (aka 'long'); cast to an unsigned type to
    negate this value to itself

Follow its advice and update the code to remove the explicit negation.
2018-12-11 12:50:21 -05:00
Brad King
73ed503ed5 jsoncpp: Drop doxygen comments not recognized by Clang
Some Clang versions warn with `-Wdocumentation-unknown-command` about
the `\internal` and `\snippet` command tag names.
2017-08-30 10:17:21 -04:00
Brad King
1a2b62b189 jsoncpp: Add initialization to pacify scanbuild
The scanbuild analysis cannot see that decodeUnicodeEscapeSequence
either initializes the `unicode` argument or returns `false` such
that the code following it runs only if `unicode` is initialized.
Add an explicit initialization to pacify it.
2017-08-30 10:17:17 -04:00
Brad King
c103a959d1 jsoncpp: Fix compilation on SunPro
The SunPro compiler does not support `#pragma pack`.
2017-08-30 10:17:13 -04:00
Brad King
0a0f71066f jsoncpp: Drop deprecation markup
Even though we disable warnings when building jsoncpp itself, including
its headers from other CMake sources may still cause warnings.
Additional work will be needed to port CMake to newer jsoncpp interfaces
while still supporting jsoncpp 1.0.0.  For now, just suppress the
markup.
2017-08-30 10:17:09 -04:00
Brad King
e09819557f Merge branch 'upstream-jsoncpp' into update-jsoncpp
* upstream-jsoncpp:
  jsoncpp 2017-08-27 (4cfae897)
2017-08-30 10:16:59 -04:00
Brad King
cb844d4119 jsoncpp: Drop unnecessary files from source list 2017-08-30 10:12:55 -04:00
Brad King
e446fa4eb4 jsoncpp: Exclude from include-what-you-use
This is third-party code.
2017-05-05 16:00:20 -04:00
Brad King
a5dd0c9d42 Add option to use a system-installed KWIML
Do not activate it with the general use-system-libs options for now
because KWIML is not commonly distributed or available.
2015-12-18 10:02:28 -05:00
Marc Chevrier
a7fe4413d5 jsoncpp: Add missing cast to convert from char to UInt
When parsing digits we know our `c - '0'` expression results in a
non-negative value due to preceding conditions.  Simply cast the result
to UInt.  This fixes compilation on SolarisStudio 12.4.
2015-09-25 08:38:20 -04:00
Joerg Sonnenberger
75644dafe5 jsoncpp: Fix compilation as C99 on Solaris
In C99 mode, Solaris variants may already define isfinite, so check for
the existence first.
2015-09-14 09:40:38 -04:00
Michael Scott
9217b678b3 jsoncpp: Provide 'isfinite' impl on more HP-UX versions (#15576)
Some versions of HP-UX do not define 'isfinite' or 'finite' in math.h
for Itanium when preprocessing with C++, so we have to add the
definition ourselves instead to map to the internal version.
2015-05-26 10:12:25 -04:00
Ådne Hovda
7b1cdb0027 jsoncpp: Provide 'isfinite' implementation on older AIX and HP-UX
Newer AIX and HP-UX platforms provide 'isfinite' as a <math.h> macro.
Older versions do not, so add the definition if it is not provided.
2015-03-31 14:55:00 -04:00
Brad King
a02fbec5f3 jsoncpp: Drop doxygen comments that cause Clang warnings
Even though we disable warnings when building jsoncpp itself, including
its headers from other CMake sources may still cause warnings.  Update
the code to remove these -Wdocumentation warnings.
2015-01-20 09:28:28 -05:00
Brad King
89cd3d273d jsoncpp: Add README-CMake.txt
Describe how to update jsoncpp from upstream.
2015-01-15 11:39:20 -05:00
Brad King
7e310624b0 jsoncpp: Provide 'isfinite' implementation on Solaris
Solaris provides a 'finite' function in <ieeefp.h>.
2015-01-15 11:39:20 -05:00
Brad King
4c49606598 jsoncpp: Provide 'isfinite' implementation on ancient glibc
The glibc 2.1 headers provide isfinite only in C99 mode.
Add its definition ourselves.
2015-01-15 11:39:04 -05:00
Brad King
50032bc847 jsoncpp: Add missing assert before strcmp in json_value.cpp
The strcmp function does not allow NULL pointers, so add an
assert to tell Clang scan-build that the code does not expect
a NULL pointer.
2015-01-15 11:39:03 -05:00
Brad King
ad94b0521e jsoncpp: Add missing <iosfwd> include in json/writer.h
The header uses std::ostream, so it must be declared.
2015-01-15 11:39:03 -05:00
Brad King
7eba04fda1 jsoncpp: Include C headers since we use APIs without std:: 2015-01-15 11:39:03 -05:00
Brad King
06f41e986c jsoncpp: Disable warnings to avoid changing 3rd party code
Add '-w' or equivalent flag on compilers supporting it.
Tell MSVC to use its lowest warning level inside jsoncpp sources.
2015-01-15 11:39:01 -05:00
Brad King
1fc556536e jsoncpp: Build the library within CMake
Update json/json.h to account for our lack of autolink.h.  Update
json/config.h to include KWSys Large File Support configuration so that
consistent stream libraries are used (on AIX with XL).

Add a cm_jsoncpp_reader.h header to include the CMake-provided copy of
the json/reader.h header from CMake sources.
2015-01-15 11:37:17 -05:00
Brad King
84d5674d4e jsoncpp: Include "config.h" before system headers 2015-01-15 11:36:49 -05:00
Brad King
a263d519ff Merge branch 'jsoncpp-upstream' into import-jsoncpp
Use a subtree merge to place the upstream content in the
Utilities/cmjsoncpp directory.
2015-01-13 14:42:00 -05:00
Brad King
32fd56b066 jsoncpp: Add .gitattributes to skip whitespace checks 2015-01-13 10:36:19 -05:00