microsoft / IPC

IPC is a C++ library that provides inter-process communication using shared memory on Windows. A .NET wrapper is available which allows interaction with C++ as well.
Other
484 stars 119 forks source link

warnings from visual studio code analysis #42

Open larsonmpdx opened 4 years ago

larsonmpdx commented 4 years ago

visual studio now integrates clang-tidy, here's the output of a run on the calc-native project. Some of these might be worth cleaning up. I didn't see any that I though were dormant bugs though.

2>CalcNative.vcxproj -> C:\local\IPC-master\x64\Debug\CalcNative.exe
C:\local\IPC-master\packages\boost.1.71.0.0\lib\native\include\boost\smart_ptr\detail\local_counted_base.hpp(45): warning C26812: The enum type 'boost::detail::local_counted_base::count_type' is unscoped. Prefer 'enum class' over 'enum' (Enum.3).
C:\local\IPC-master\packages\boost.1.71.0.0\lib\native\include\boost\date_time\gregorian\greg_weekday.hpp(55): warning C26812: The enum type 'boost::date_time::weekdays' is unscoped. Prefer 'enum class' over 'enum' (Enum.3).
C:\local\IPC-master\packages\boost.1.71.0.0\lib\native\include\boost\date_time\gregorian\greg_month.hpp(61): warning C26812: The enum type 'boost::date_time::months_of_year' is unscoped. Prefer 'enum class' over 'enum' (Enum.3).
C:\local\IPC-master\packages\boost.1.71.0.0\lib\native\include\boost\date_time\gregorian\greg_duration.hpp(38): warning C26812: The enum type 'boost::date_time::special_values' is unscoped. Prefer 'enum class' over 'enum' (Enum.3).
C:\local\IPC-master\packages\boost.1.71.0.0\lib\native\include\boost\numeric\conversion\converter_policies.hpp(161): warning C26812: The enum type 'boost::numeric::range_check_result' is unscoped. Prefer 'enum class' over 'enum' (Enum.3).
C:\local\IPC-master\packages\boost.1.71.0.0\lib\native\include\boost\interprocess\detail\win32_api.hpp(1372): warning C6248: Setting a SECURITY_DESCRIPTOR's DACL to NULL will result in an unprotected object.
C:\local\IPC-master\packages\boost.1.71.0.0\lib\native\include\boost\interprocess\detail\win32_api.hpp(1367): warning C26495: Variable 'boost::interprocess::winapi::interprocess_all_access_security::sa' is uninitialized. Always initialize a member variable (type.6).
C:\local\IPC-master\packages\boost.1.71.0.0\lib\native\include\boost\interprocess\detail\os_thread_functions.hpp(226): warning C26451: Arithmetic overflow: Using operator '<<' on a 4 byte value and then casting the result to a 8 byte value. Cast the value to the wider type before calling operator '<<' to avoid overflow (io.2).
C:\local\IPC-master\packages\boost.1.71.0.0\lib\native\include\boost\interprocess\errors.hpp(200): warning C26812: The enum type 'boost::interprocess::error_code_t' is unscoped. Prefer 'enum class' over 'enum' (Enum.3).
C:\local\IPC-master\packages\boost.1.71.0.0\lib\native\include\boost\interprocess\detail\os_file_functions.hpp(125): warning C26812: The enum type 'boost::interprocess::mode_t' is unscoped. Prefer 'enum class' over 'enum' (Enum.3).
C:\local\IPC-master\packages\boost.1.71.0.0\lib\native\include\boost\interprocess\detail\os_file_functions.hpp(161): warning C26498: The function 'std::numeric_limits<__int64>::max' is constexpr, mark variable 'max_filesize' constexpr if compile-time evaluation is desired (con.5).
C:\local\IPC-master\packages\boost.1.71.0.0\lib\native\include\boost\interprocess\detail\os_file_functions.hpp(202): warning C26812: The enum type 'boost::interprocess::file_pos_t' is unscoped. Prefer 'enum class' over 'enum' (Enum.3).
C:\local\IPC-master\packages\boost.1.71.0.0\lib\native\include\boost\interprocess\detail\os_file_functions.hpp(242): warning C6282: Incorrect operator:  assignment of constant in Boolean context. Consider using '==' instead.
C:\local\IPC-master\packages\boost.1.71.0.0\lib\native\include\boost\interprocess\detail\os_file_functions.hpp(271): warning C6282: Incorrect operator:  assignment of constant in Boolean context. Consider using '==' instead.
C:\local\IPC-master\packages\boost.1.71.0.0\lib\native\include\boost\intrusive\options.hpp(249): warning C26812: The enum type 'boost::intrusive::link_mode_type' is unscoped. Prefer 'enum class' over 'enum' (Enum.3).
C:\local\IPC-master\packages\boost.1.71.0.0\lib\native\include\boost\intrusive\sgtree.hpp(110): warning C26451: Arithmetic overflow: Using operator '*' on a 4 byte value and then casting the result to a 8 byte value. Cast the value to the wider type before calling operator '*' to avoid overflow (io.2).
C:\local\IPC-master\packages\boost.1.71.0.0\lib\native\include\boost\container\options.hpp(55): warning C26812: The enum type 'boost::container::tree_type_enum' is unscoped. Prefer 'enum class' over 'enum' (Enum.3).
C:\local\IPC-master\packages\boost.1.71.0.0\lib\native\include\boost\intrusive\detail\is_stateful_value_traits.hpp(68): warning C6285: (<non-zero constant> || <non-zero constant>) is always a non-zero constant.  Did you intend to use the bitwise-and operator?
C:\local\IPC-master\packages\boost.1.71.0.0\lib\native\include\boost\intrusive\detail\is_stateful_value_traits.hpp(65): warning C6285: (<non-zero constant> || <non-zero constant>) is always a non-zero constant.  Did you intend to use the bitwise-and operator?
C:\local\IPC-master\packages\boost.1.71.0.0\lib\native\include\boost\interprocess\mapped_region.hpp(143): warning C26439: This kind of function may not throw. Declare it 'noexcept' (f.6).
C:\local\IPC-master\packages\boost.1.71.0.0\lib\native\include\boost\interprocess\mapped_region.hpp(160): warning C26439: This kind of function may not throw. Declare it 'noexcept' (f.6).
C:\local\IPC-master\packages\boost.1.71.0.0\lib\native\include\boost\interprocess\mapped_region.hpp(549): warning C26812: The enum type 'boost::interprocess::mapped_region::advice_types' is unscoped. Prefer 'enum class' over 'enum' (Enum.3).
C:\local\IPC-master\packages\boost.1.71.0.0\lib\native\include\boost\interprocess\windows_shared_memory.hpp(92): warning C26439: This kind of function may not throw. Declare it 'noexcept' (f.6).
C:\local\IPC-master\packages\boost.1.71.0.0\lib\native\include\boost\interprocess\windows_shared_memory.hpp(99): warning C26439: This kind of function may not throw. Declare it 'noexcept' (f.6).
C:\local\IPC-master\packages\boost.1.71.0.0\lib\native\include\boost\interprocess\windows_shared_memory.hpp(145): warning C26495: Variable 'boost::interprocess::windows_shared_memory::m_mode' is uninitialized. Always initialize a member variable (type.6).
C:\local\IPC-master\packages\boost.1.71.0.0\lib\native\include\boost\interprocess\windows_shared_memory.hpp(174): warning C26812: The enum type 'boost::interprocess::ipcdetail::create_enum_t' is unscoped. Prefer 'enum class' over 'enum' (Enum.3).
C:\local\IPC-master\packages\boost.1.71.0.0\lib\native\include\boost\interprocess\sync\spin\recursive_mutex.hpp(75): warning C26495: Variable 'boost::interprocess::ipcdetail::spin_recursive_mutex::m_s' is uninitialized. Always initialize a member variable (type.6).
C:\local\IPC-master\packages\boost.1.71.0.0\lib\native\include\boost\function\function_base.hpp(603): warning C26495: Variable 'boost::function_base::functor' is uninitialized. Always initialize a member variable (type.6).
C:\local\IPC-master\packages\boost.1.71.0.0\lib\native\include\boost\lockfree\detail\freelist.hpp(267): warning C26495: Variable 'boost::lockfree::detail::tagged_index::tag' is uninitialized. Always initialize a member variable (type.6).
C:\local\IPC-master\Inc\IPC\detail\Callback.h(72): warning C26439: This kind of function may not throw. Declare it 'noexcept' (f.6).
C:\local\IPC-master\packages\boost.1.71.0.0\lib\native\include\boost\function\function_template.hpp(1104): warning C26439: This kind of function may not throw. Declare it 'noexcept' (f.6).
C:\local\IPC-master\packages\boost.1.71.0.0\lib\native\include\boost\date_time\time.hpp(61): warning C26812: The enum type 'boost::date_time::dst_flags' is unscoped. Prefer 'enum class' over 'enum' (Enum.3).
C:\local\IPC-master\packages\boost.1.71.0.0\lib\native\include\boost\optional\optional.hpp(140): warning C26495: Variable 'boost::optional_detail::optional_base<Calc::Response>::m_storage' is uninitialized. Always initialize a member variable (type.6).
C:\local\IPC-master\packages\boost.1.71.0.0\lib\native\include\boost\function\function_template.hpp(1093): warning C26439: This kind of function may not throw. Declare it 'noexcept' (f.6).
C:\local\IPC-master\packages\boost.1.71.0.0\lib\native\include\boost\date_time\microsec_time_clock.hpp(125): warning C26451: Arithmetic overflow: Using operator '*' on a 4 byte value and then casting the result to a 8 byte value. Cast the value to the wider type before calling operator '*' to avoid overflow (io.2).
C:\local\IPC-master\packages\boost.1.71.0.0\lib\native\include\boost\function\function_template.hpp(750): warning C26439: This kind of function may not throw. Declare it 'noexcept' (f.6).
C:\local\IPC-master\packages\boost.1.71.0.0\lib\native\include\boost\date_time\constrained_value.hpp(108): warning C26812: The enum type 'boost::CV::violation_enum' is unscoped. Prefer 'enum class' over 'enum' (Enum.3).
C:\local\IPC-master\packages\boost.1.71.0.0\lib\native\include\boost\intrusive\rbtree_algorithms.hpp(450): warning C26812: The enum type 'boost::intrusive::compact_rbtree_node<void *>::color' is unscoped. Prefer 'enum class' over 'enum' (Enum.3).
C:\local\IPC-master\packages\boost.1.71.0.0\lib\native\include\boost\container\string.hpp(140): warning C26495: Variable 'boost::container::dtl::basic_string_base<IPC::SharedMemory::Allocator<char> >::long_t::storage' is uninitialized. Always initialize a member variable (type.6).
C:\local\IPC-master\Inc\IPC\detail\Callback.h(71): warning C26439: This kind of function may not throw. Declare it 'noexcept' (f.6).
C:\local\IPC-master\Inc\IPC\detail\ChannelBase.h(62): warning C26439: This kind of function may not throw. Declare it 'noexcept' (f.6).
C:\local\IPC-master\packages\boost.1.71.0.0\lib\native\include\boost\interprocess\smart_ptr\shared_ptr.hpp(176): warning C26439: This kind of function may not throw. Declare it 'noexcept' (f.6).
C:\local\IPC-master\Inc\IPC\Connector.h(71): warning C26439: This kind of function may not throw. Declare it 'noexcept' (f.6).
C:\local\IPC-master\packages\boost.1.71.0.0\lib\native\include\boost\container\detail\tree.hpp(217): warning C26495: Variable 'boost::container::dtl::tree_node<std::pair<boost::interprocess::ipcdetail::sync_id const * const,boost::unordered::iterator_detail::iterator<boost::unordered::detail::ptr_node<std::pair<boost::interprocess::ipcdetail::sync_id const ,void *> > > >,void *,0,1>::m_storage' is uninitialized. Always initialize a member variable (type.6).
C:\local\IPC-master\packages\boost.1.71.0.0\lib\native\include\boost\lockfree\queue.hpp(128): warning C26495: Variable 'boost::lockfree::queue<unsigned int,boost::lockfree::capacity<64> >::node::data' is uninitialized. Always initialize a member variable (type.6).
C:\local\IPC-master\packages\boost.1.71.0.0\lib\native\include\boost\optional\detail\optional_trivially_copyable_base.hpp(25): warning C26495: Variable 'boost::optional_detail::tc_optional_base<unsigned int>::m_storage' is uninitialized. Always initialize a member variable (type.6).
C:\local\IPC-master\packages\boost.1.71.0.0\lib\native\include\boost\lockfree\detail\freelist.hpp(341): warning C26495: Variable 'boost::lockfree::detail::compiletime_sized_freelist_storage<boost::lockfree::queue<unsigned int,boost::lockfree::capacity<64> >::node,65>::data' is uninitialized. Always initialize a member variable (type.6).
C:\local\IPC-master\packages\boost.1.71.0.0\lib\native\include\boost\interprocess\detail\segment_manager_helper.hpp(105): warning C26451: Arithmetic overflow: Using operator '*' on a 4 byte value and then casting the result to a 8 byte value. Cast the value to the wider type before calling operator '*' to avoid overflow (io.2).
C:\local\IPC-master\packages\boost.1.71.0.0\lib\native\include\boost\interprocess\detail\segment_manager_helper.hpp(105): warning C26451: Arithmetic overflow: Using operator '+' on a 4 byte value and then casting the result to a 8 byte value. Cast the value to the wider type before calling operator '+' to avoid overflow (io.2).
C:\local\IPC-master\Inc\IPC\detail\Callback.h(27): warning C26439: This kind of function may not throw. Declare it 'noexcept' (f.6).
C:\local\IPC-master\packages\boost.1.71.0.0\lib\native\include\boost\interprocess\sync\scoped_lock.hpp(131): warning C26439: This kind of function may not throw. Declare it 'noexcept' (f.6).
C:\local\IPC-master\packages\boost.1.71.0.0\lib\native\include\boost\optional\detail\optional_trivially_copyable_base.hpp(29): warning C26495: Variable 'boost::optional_detail::tc_optional_base<unsigned int>::m_storage' is uninitialized. Always initialize a member variable (type.6).
C:\local\IPC-master\Inc\IPC\detail\LockFree\FixedQueue.h(29): warning C26495: Variable 'IPC::detail::LockFree::FixedQueue<IPC::detail::ConnectorPingInfo,64,void>::m_storage' is uninitialized. Always initialize a member variable (type.6).
2>Done building project "CalcNative.vcxproj".