Boost logo

Boost Users :

Subject: [Boost-users] [property_tree] - unsuppressed warning under VS2015 Update 3
From: Tamas.Ruszkai_at_[hidden]
Date: 2016-08-16 04:51:00


Hi,

In VisualStudio 2015 Update 3 I get the following warning when I use the json deserializer.

The code that causes the problem is:
                boost::property_tree::read_json(configFile.string(), loadedConfig);


1>d:\workspaces\aherdevrtam02-kazaara\3rdparty\boost\1.60.0\boost\property_tree\detail\json_parser\standard_callbacks.hpp(132): warning C4715: 'boost::property_tree::json_parser::detail::standard_callbacks<boost::property_tree::basic_ptree<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > >::new_tree': not all control paths return a value

I have checked the code and the branch that does not return a value has an assert there. It seems VS does not consider that. Could you please suppress that warning or solve it somehow that the warning does not come?
In my project we have the "treat warnings as errors" option enabled.

Thanks!

Regards,
Tamas

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net