Skip to content

Warnings C4715 and C4127 when building json-3.9.1 with Visual Studio 2019 16.7.7 #2592

Closed
@Andreas-Schniertshauer

Description

@Andreas-Schniertshauer

I get the following warnings when building json-3.9.1 with Visual Studio 2019 16.7.7:

single_include\nlohmann\json.hpp(4697): warning C4715: 'nlohmann::detail::hash<nlohmann::basic_json<std::map,std::vector,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,bool,__int64,unsigned __int64,double,std::al
locator,nlohmann::adl_serializer,std::vector<unsigned char,std::allocator<unsigned char> > > >': not all control paths return a value
test\src\unit-json_pointer.cpp(362,78): warning C4127: conditional expression is constant

Please describe the steps to reproduce the issue.

  1. Download json-3.9.1.zip and unzip
  2. Open a Developer command Prompt v16.7.7
  3. cd json-3.9.1
  4. Create directory build and cd build
  5. cmake ..\ -D JSON_Install:BOOL=OFF -D JSON_ImplicitConversions:BOOL=OFF -D JSON_BuildTests:BOOL=ON
  6. cmake --build .

What is the expected behavior?

No warnings

And what is the actual behavior instead?

Warnings

Which compiler and operating system are you using?

  • Compiler: Visual Studio 2019 16.7.7 Professional
  • Operating system: Windows 10 2004 Pro German

Which version of the library did you use?

  • latest release version 3.9.1

Metadata

Metadata

Assignees

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions