LOK: tilebench improvements
[LibreOffice.git] / external / boost / ubsan.patch.0
blob2dfd2cf673bc04df953782d6559da9d5455f3446
1 Work around -fsanitize=bool and -fsanitize=nonnull-attribute
3 --- boost/algorithm/string/find_iterator.hpp
4 +++ boost/algorithm/string/find_iterator.hpp
5 @@ -240,7 +240,7 @@
6                  m_Match(Other.m_Match),
7                  m_Next(Other.m_Next),
8                  m_End(Other.m_End),
9 -                m_bEof(Other.m_bEof)
10 +                m_bEof(Other.eof())
11              {}
13              //! Constructor
14 --- boost/circular_buffer/base.hpp
15 +++ boost/circular_buffer/base.hpp
16 @@ -2355,7 +2355,7 @@
17      //! Add <code>n</code> to the pointer.
18      template <class Pointer>
19      Pointer add(Pointer p, difference_type n) const {
20 -        return p + (n < (m_end - p) ? n : n - capacity());
21 +        return p + (n < (m_end - p) ? n : difference_type(n - capacity()));
22      }
24      //! Subtract <code>n</code> from the pointer.
25 --- boost/circular_buffer/debug.hpp
26 +++ boost/circular_buffer/debug.hpp
27 @@ -34,7 +34,7 @@
29  template <class T>
30  inline void do_fill_uninitialized_memory(T* data, std::size_t size_in_bytes) BOOST_NOEXCEPT {
31 -    std::memset(static_cast<void*>(data), UNINITIALIZED, size_in_bytes);
32 +    if (size_in_bytes != 0) std::memset(static_cast<void*>(data), UNINITIALIZED, size_in_bytes);
33  }
35  template <class T>