Opened 8 years ago

Last modified 6 years ago

#10356 new Bugs

Massive Warnings Wall whenu using signal2 call operator - VS2013U3

Reported by: mjklaim@… Owned by: Frank Mori Hess
Milestone: To Be Determined Component: signals2
Version: Boost 1.56.0 Severity: Problem
Keywords: Cc:

Description

#include <boost/signals2.hpp>

void foo()
{
  boost::signals2::signal<void()> signal;
  signal();
}

On VS2013 Update3 I get this output on compilation:

1>------ Build started: Project: test_distributed_value, Configuration: Debug x64 ------
1>  main.cpp
1>C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\xmemory(348): warning C4996: 'std::_Uninitialized_copy0': Function call with parameters that may be unsafe - this call relies on the caller to check that the passed values are correct. To disable this warning, use -D_SCL_SECURE_NO_WARNINGS. See documentation on how to use Visual C++ 'Checked Iterators'
1>          C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\xmemory(333) : see declaration of 'std::_Uninitialized_copy0'
1>          C:\Users\jlamotte\Documents\sdk\boost\boost\include\boost-1_56\boost/signals2/detail/auto_buffer.hpp(192) : see reference to function template instantiation '_FwdIt std::uninitialized_copy<I,boost::variant<boost::shared_ptr<void>,boost::signals2::detail::foreign_void_shared_ptr,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_>*>(_InIt,_InIt,_FwdIt)' being compiled
1>          with
1>          [
1>              _FwdIt=boost::variant<boost::shared_ptr<void>,boost::signals2::detail::foreign_void_shared_ptr,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_> *
1>  ,            I=boost::variant<boost::shared_ptr<void>,boost::signals2::detail::foreign_void_shared_ptr,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_> *
1>  ,            _InIt=boost::variant<boost::shared_ptr<void>,boost::signals2::detail::foreign_void_shared_ptr,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_> *
1>          ]
1>          C:\Users\jlamotte\Documents\sdk\boost\boost\include\boost-1_56\boost/signals2/detail/auto_buffer.hpp(179) : see reference to function template instantiation 'void boost::signals2::detail::auto_buffer<boost::signals2::detail::void_shared_ptr_variant,boost::signals2::detail::store_n_objects<10>,boost::signals2::detail::default_grow_policy,std::allocator<_Ty>>::copy_rai<I,false>(I,I,boost::variant<boost::shared_ptr<void>,boost::signals2::detail::foreign_void_shared_ptr,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_> *,const boost::integral_constant<bool,false> &)' being compiled
1>          with
1>          [
1>              _Ty=boost::signals2::detail::void_shared_ptr_variant
1>  ,            I=boost::variant<boost::shared_ptr<void>,boost::signals2::detail::foreign_void_shared_ptr,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_> *
1>          ]
1>          C:\Users\jlamotte\Documents\sdk\boost\boost\include\boost-1_56\boost/signals2/detail/auto_buffer.hpp(179) : see reference to function template instantiation 'void boost::signals2::detail::auto_buffer<boost::signals2::detail::void_shared_ptr_variant,boost::signals2::detail::store_n_objects<10>,boost::signals2::detail::default_grow_policy,std::allocator<_Ty>>::copy_rai<I,false>(I,I,boost::variant<boost::shared_ptr<void>,boost::signals2::detail::foreign_void_shared_ptr,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_> *,const boost::integral_constant<bool,false> &)' being compiled
1>          with
1>          [
1>              _Ty=boost::signals2::detail::void_shared_ptr_variant
1>  ,            I=boost::variant<boost::shared_ptr<void>,boost::signals2::detail::foreign_void_shared_ptr,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_> *
1>          ]
1>          C:\Users\jlamotte\Documents\sdk\boost\boost\include\boost-1_56\boost/signals2/detail/auto_buffer.hpp(205) : see reference to function template instantiation 'void boost::signals2::detail::auto_buffer<boost::signals2::detail::void_shared_ptr_variant,boost::signals2::detail::store_n_objects<10>,boost::signals2::detail::default_grow_policy,std::allocator<_Ty>>::copy_impl<I>(I,I,boost::variant<boost::shared_ptr<void>,boost::signals2::detail::foreign_void_shared_ptr,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_> *,std::random_access_iterator_tag)' being compiled
1>          with
1>          [
1>              _Ty=boost::signals2::detail::void_shared_ptr_variant
1>  ,            I=boost::variant<boost::shared_ptr<void>,boost::signals2::detail::foreign_void_shared_ptr,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_> *
1>          ]
1>          C:\Users\jlamotte\Documents\sdk\boost\boost\include\boost-1_56\boost/signals2/detail/auto_buffer.hpp(205) : see reference to function template instantiation 'void boost::signals2::detail::auto_buffer<boost::signals2::detail::void_shared_ptr_variant,boost::signals2::detail::store_n_objects<10>,boost::signals2::detail::default_grow_policy,std::allocator<_Ty>>::copy_impl<I>(I,I,boost::variant<boost::shared_ptr<void>,boost::signals2::detail::foreign_void_shared_ptr,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_> *,std::random_access_iterator_tag)' being compiled
1>          with
1>          [
1>              _Ty=boost::signals2::detail::void_shared_ptr_variant
1>  ,            I=boost::variant<boost::shared_ptr<void>,boost::signals2::detail::foreign_void_shared_ptr,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_> *
1>          ]
1>          C:\Users\jlamotte\Documents\sdk\boost\boost\include\boost-1_56\boost/signals2/detail/auto_buffer.hpp(289) : see reference to function template instantiation 'void boost::signals2::detail::auto_buffer<boost::signals2::detail::void_shared_ptr_variant,boost::signals2::detail::store_n_objects<10>,boost::signals2::detail::default_grow_policy,std::allocator<_Ty>>::copy_impl<boost::variant<boost::shared_ptr<void>,boost::signals2::detail::foreign_void_shared_ptr,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_>*>(I,I,boost::variant<boost::shared_ptr<void>,boost::signals2::detail::foreign_void_shared_ptr,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_> *)' being compiled
1>          with
1>          [
1>              _Ty=boost::signals2::detail::void_shared_ptr_variant
1>  ,            I=boost::variant<boost::shared_ptr<void>,boost::signals2::detail::foreign_void_shared_ptr,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_> *
1>          ]
1>          C:\Users\jlamotte\Documents\sdk\boost\boost\include\boost-1_56\boost/signals2/detail/auto_buffer.hpp(289) : see reference to function template instantiation 'void boost::signals2::detail::auto_buffer<boost::signals2::detail::void_shared_ptr_variant,boost::signals2::detail::store_n_objects<10>,boost::signals2::detail::default_grow_policy,std::allocator<_Ty>>::copy_impl<boost::variant<boost::shared_ptr<void>,boost::signals2::detail::foreign_void_shared_ptr,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_>*>(I,I,boost::variant<boost::shared_ptr<void>,boost::signals2::detail::foreign_void_shared_ptr,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_> *)' being compiled
1>          with
1>          [
1>              _Ty=boost::signals2::detail::void_shared_ptr_variant
1>  ,            I=boost::variant<boost::shared_ptr<void>,boost::signals2::detail::foreign_void_shared_ptr,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_> *
1>          ]
1>          C:\Users\jlamotte\Documents\sdk\boost\boost\include\boost-1_56\boost/signals2/detail/auto_buffer.hpp(282) : while compiling class template member function 'boost::variant<boost::shared_ptr<void>,boost::signals2::detail::foreign_void_shared_ptr,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_> *boost::signals2::detail::auto_buffer<boost::signals2::detail::void_shared_ptr_variant,boost::signals2::detail::store_n_objects<10>,boost::signals2::detail::default_grow_policy,std::allocator<_Ty>>::move_to_new_buffer(unsigned __int64,const boost::false_type &)'
1>          with
1>          [
1>              _Ty=boost::signals2::detail::void_shared_ptr_variant
1>          ]
1>          C:\Users\jlamotte\Documents\sdk\boost\boost\include\boost-1_56\boost/signals2/detail/auto_buffer.hpp(304) : see reference to function template instantiation 'boost::variant<boost::shared_ptr<void>,boost::signals2::detail::foreign_void_shared_ptr,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_> *boost::signals2::detail::auto_buffer<boost::signals2::detail::void_shared_ptr_variant,boost::signals2::detail::store_n_objects<10>,boost::signals2::detail::default_grow_policy,std::allocator<_Ty>>::move_to_new_buffer(unsigned __int64,const boost::false_type &)' being compiled
1>          with
1>          [
1>              _Ty=boost::signals2::detail::void_shared_ptr_variant
1>          ]
1>          C:\Users\jlamotte\Documents\sdk\boost\boost\include\boost-1_56\boost/signals2/detail/slot_call_iterator.hpp(40) : see reference to class template instantiation 'boost::signals2::detail::auto_buffer<boost::signals2::detail::void_shared_ptr_variant,boost::signals2::detail::store_n_objects<10>,boost::signals2::detail::default_grow_policy,std::allocator<_Ty>>' being compiled
1>          with
1>          [
1>              _Ty=boost::signals2::detail::void_shared_ptr_variant
1>          ]
1>          C:\Users\jlamotte\Documents\sdk\boost\boost\include\boost-1_56\boost/signals2/detail/slot_call_iterator.hpp(44) : see reference to class template instantiation 'boost::signals2::detail::slot_call_iterator_cache<ResultType,Function>' being compiled
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========

Build Summary
-------------
00:01.496 - Success - Debug x64 - test_distributed_value.vcxproj

Total build time: 00:01.496

========== Build: 1 succeeded or up-to-date, 0 failed, 2 skipped, Completed at 14/08/2014 16:08:05 ==========

Change History (3)

comment:1 by mjklaim@…, 8 years ago

Component: Nonesignals2
Owner: set to Frank Mori Hess
Summary: Massive Warnings Wall whenu using signal call operator - VS2013U3Massive Warnings Wall whenu using signal2 call operator - VS2013U3

comment:2 by David Carr, 7 years ago

Continues to persist in VS2013 update 5, warning Level3 (/W3), against Boost v1.59, debug build only. In Release there are no warnings. Would be great if the warnings weren't there.

comment:3 by Frank Mori Hess, 6 years ago

The top of signals2/detail/auto_buffer.hpp has the following

#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400)
#pragma warning(push)
#pragma warning(disable:4996)
#endif

which ought to disable warning 4996 for the file on your compiler?

Note: See TracTickets for help on using tickets.