Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37504690
en ru br
ALT Linux repos
S:1.83.0-alt2
D:1.37.0-alt2
5.0: 1.36.0-alt4
4.1: 1.34.1-alt1
4.0: 1.33.1-alt4
3.0: 1.32.0-alt2

Group :: Development/C++
RPM: boost

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

Patch: boost-1.37.0-alt-warnings.patch
Download


diff --git a/boost/boost/archive/impl/basic_binary_iprimitive.ipp b/boost/boost/archive/impl/basic_binary_iprimitive.ipp
index 5d48a71..c9ee750 100644
--- a/boost/boost/archive/impl/basic_binary_iprimitive.ipp
+++ b/boost/boost/archive/impl/basic_binary_iprimitive.ipp
@@ -182,7 +182,7 @@ template<class Archive, class Elem, class Tr>
 BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY())
 basic_binary_iprimitive<Archive, Elem, Tr>::~basic_binary_iprimitive(){
     // push back unread characters
-    int result = static_cast<detail::input_streambuf_access<Elem, Tr> &>(
+    (void) static_cast<detail::input_streambuf_access<Elem, Tr> &>(
         m_sb
     ).sync();
     //destructor can't throw !
diff --git a/boost/boost/archive/iterators/base64_from_binary.hpp b/boost/boost/archive/iterators/base64_from_binary.hpp
index c8f2315..fbabdf6 100644
--- a/boost/boost/archive/iterators/base64_from_binary.hpp
+++ b/boost/boost/archive/iterators/base64_from_binary.hpp
@@ -43,7 +43,7 @@ struct from_6_bit {
             "0123456789"
             "+/";
         assert(t < 64);
-        return lookup_table[t];
+        return lookup_table[static_cast<size_t>(t)];
     }
 };
 
diff --git a/boost/boost/statechart/state_machine.hpp b/boost/boost/statechart/state_machine.hpp
index 88b38aa..9c99cd1 100644
--- a/boost/boost/statechart/state_machine.hpp
+++ b/boost/boost/statechart/state_machine.hpp
@@ -549,9 +549,9 @@ class state_machine : noncopyable
         add_impl( pState, *pState );
 
       if ( isInnermostCommonOuter_ ||
-        is_in_highest_orthogonal_region< State >() &&
+        ( is_in_highest_orthogonal_region< State >() &&
         ( get_pointer( pOutermostUnstableState_ ) ==
-          pState->State::outer_state_ptr() ) )
+          pState->State::outer_state_ptr() ) ) )
       {
         isInnermostCommonOuter_ = false;
         pOutermostUnstableState_ = pNewOutermostUnstableStateCandidate;
diff --git a/boost/boost/test/floating_point_comparison.hpp b/boost/boost/test/floating_point_comparison.hpp
index 9f4212f..2de5d63 100644
--- a/boost/boost/test/floating_point_comparison.hpp
+++ b/boost/boost/test/floating_point_comparison.hpp
@@ -79,17 +79,26 @@ inline FPT
 safe_fpt_division( FPT f1, FPT f2 )
 {
     // Avoid overflow.
-    if( f2 < static_cast<FPT>(1)  && f1 > f2*fpt_limits<FPT>::max_value() )
+    if( (f2 < static_cast<FPT>(1))  && (f1 > f2*fpt_limits<FPT>::max_value()) )
         return fpt_limits<FPT>::max_value();
 
     // Avoid underflow.
-    if( f1 == static_cast<FPT>(0) ||
-        f2 > static_cast<FPT>(1) && f1 < f2*fpt_limits<FPT>::min_value() )
+    if( (f1 == static_cast<FPT>(0)) ||
+        ((f2 > static_cast<FPT>(1)) && (f1 < f2*fpt_limits<FPT>::min_value())) )
         return static_cast<FPT>(0);
 
     return f1/f2;
 }
 
+// helper templates to prevent ODR violations
+template<class T>
+struct static_constant {
+    static T value;
+};
+
+template<class T>
+T static_constant<T>::value;
+
 //____________________________________________________________________________//
 
 } // namespace tt_detail
@@ -221,7 +230,7 @@ struct BOOST_TEST_DECL check_is_close_t {
 };
 
 namespace {
-check_is_close_t check_is_close;
+const check_is_close_t& check_is_close = tt_detail::static_constant<check_is_close_t>::value;
 }
 
 //____________________________________________________________________________//
@@ -243,7 +252,7 @@ struct BOOST_TEST_DECL check_is_small_t {
 };
 
 namespace {
-check_is_small_t check_is_small;
+const check_is_small_t& check_is_small = tt_detail::static_constant<check_is_small_t>::value;
 }
 
 //____________________________________________________________________________//
diff --git a/boost/boost/tuple/tuple_comparison.hpp b/boost/boost/tuple/tuple_comparison.hpp
index 178bbb9..822cbe6 100644
--- a/boost/boost/tuple/tuple_comparison.hpp
+++ b/boost/boost/tuple/tuple_comparison.hpp
@@ -69,8 +69,8 @@ inline bool neq<null_type,null_type>(const null_type&, const null_type&) { retur
 template<class T1, class T2>
 inline bool lt(const T1& lhs, const T2& rhs) {
   return lhs.get_head() < rhs.get_head()  ||
-            !(rhs.get_head() < lhs.get_head()) &&
-            lt(lhs.get_tail(), rhs.get_tail());
+            ( !(rhs.get_head() < lhs.get_head()) &&
+              lt(lhs.get_tail(), rhs.get_tail()));
 }
 template<>
 inline bool lt<null_type,null_type>(const null_type&, const null_type&) { return false; }
@@ -78,8 +78,8 @@ inline bool lt<null_type,null_type>(const null_type&, const null_type&) { return
 template<class T1, class T2>
 inline bool gt(const T1& lhs, const T2& rhs) {
   return lhs.get_head() > rhs.get_head()  ||
-            !(rhs.get_head() > lhs.get_head()) &&
-            gt(lhs.get_tail(), rhs.get_tail());
+            ( !(rhs.get_head() > lhs.get_head()) &&
+              gt(lhs.get_tail(), rhs.get_tail()));
 }
 template<>
 inline bool gt<null_type,null_type>(const null_type&, const null_type&) { return false; }
diff --git a/boost/boost/wave/util/unput_queue_iterator.hpp b/boost/boost/wave/util/unput_queue_iterator.hpp
index 618955c..7d78e62 100644
--- a/boost/boost/wave/util/unput_queue_iterator.hpp
+++ b/boost/boost/wave/util/unput_queue_iterator.hpp
@@ -219,7 +219,7 @@ public:
     // objects are equal and the base iterators are equal as well
         OtherDerivedT const &rhs = static_cast<OtherDerivedT const &>(x);
         return 
-            (unput_queue.empty() && rhs.unput_queue.empty() ||
+            ((unput_queue.empty() && rhs.unput_queue.empty()) ||
               (&unput_queue == &rhs.unput_queue &&
                unput_queue.begin() == rhs.unput_queue.begin()
               )
 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin