Skip to content

cppcheck failing for version 3.1.2 #1101

Closed
@psalvaggio

Description

  • What is the issue you have?

The "make cppcheck" test is failing on version 3.1.2

  • Please describe the steps to reproduce the issue. Can you provide a small but working code example?

Download the .tar.gz for the version, run "make cppcheck"

  • What is the expected behavior?

Passing

  • And what is the actual behavior instead?
[json-3.1.2]$ make cppcheck
cppcheck --enable=warning --inconclusive --force --std=c++11 single_include/nlohmann/json.hpp --error-exitcode=1
Checking single_include/nlohmann/json.hpp ...
[single_include/nlohmann/json.hpp:72]: (error) syntax error
Checking single_include/nlohmann/json.hpp: JSON_CATCH_USER...
Checking single_include/nlohmann/json.hpp: JSON_NOEXCEPTION;_CPPUNWIND;__EXCEPTIONS;__cpp_exceptions...
Checking single_include/nlohmann/json.hpp: JSON_THROW_USER...
Checking single_include/nlohmann/json.hpp: JSON_TRY_USER...
Checking single_include/nlohmann/json.hpp: _HAS_CXX14...
Checking single_include/nlohmann/json.hpp: _HAS_CXX17...
Checking single_include/nlohmann/json.hpp: _MSC_VER...
Checking single_include/nlohmann/json.hpp: _WIN32...
Checking single_include/nlohmann/json.hpp: __APPLE__...
Checking single_include/nlohmann/json.hpp: __GNUC__...
Checking single_include/nlohmann/json.hpp: __GNUC__;__GNUG__...
Checking single_include/nlohmann/json.hpp: __GNUC__;__GNUG__;__clang__...
Checking single_include/nlohmann/json.hpp: __HP_aCC;__HP_cc...
Checking single_include/nlohmann/json.hpp: __IBMCPP__...
Checking single_include/nlohmann/json.hpp: __ICC;__INTEL_COMPILER...
Checking single_include/nlohmann/json.hpp: __PGI...
Checking single_include/nlohmann/json.hpp: __SUNPRO_CC...
Checking single_include/nlohmann/json.hpp: __clang__...
Checking single_include/nlohmann/json.hpp: __linux__...
Checking single_include/nlohmann/json.hpp: __unix__...
make: *** [Makefile:259: cppcheck] Error 1

GCC 7.3.1 on Fedora 27

  • Did you use a released version of the library or the version from the develop branch?

Released

Unit tests are all passing.

Metadata

Assignees

Labels

confirmedsolution: proposed fixa fix for the issue has been proposed and waits for confirmation

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions