diff options
Diffstat (limited to 'dev-libs/STLport/files/STLport-5.1.5-fix-warnings.patch')
-rw-r--r-- | dev-libs/STLport/files/STLport-5.1.5-fix-warnings.patch | 96 |
1 files changed, 96 insertions, 0 deletions
diff --git a/dev-libs/STLport/files/STLport-5.1.5-fix-warnings.patch b/dev-libs/STLport/files/STLport-5.1.5-fix-warnings.patch new file mode 100644 index 000000000000..fc155482f53f --- /dev/null +++ b/dev-libs/STLport/files/STLport-5.1.5-fix-warnings.patch @@ -0,0 +1,96 @@ +--- STLport-5.1.5.orig/stlport/stl/_num_put.c ++++ STLport-5.1.5/stlport/stl/_num_put.c +@@ -158,7 +158,7 @@ + //casting numeric_limits<ptrdiff_t>::max to streamsize only works is ptrdiff_t is signed or streamsize representation + //is larger than ptrdiff_t one. + _STLP_STATIC_ASSERT((sizeof(streamsize) > sizeof(ptrdiff_t)) || +- (sizeof(streamsize) == sizeof(ptrdiff_t)) && numeric_limits<ptrdiff_t>::is_signed) ++ ((sizeof(streamsize) == sizeof(ptrdiff_t)) && numeric_limits<ptrdiff_t>::is_signed)) + ptrdiff_t __pad = __STATIC_CAST(ptrdiff_t, (min) (__STATIC_CAST(streamsize, (numeric_limits<ptrdiff_t>::max)()), + __STATIC_CAST(streamsize, __wid - __len))); + ios_base::fmtflags __dir = __flg & ios_base::adjustfield; +--- STLport-5.1.5.orig/stlport/stl/_istream.c ++++ STLport-5.1.5/stlport/stl/_istream.c +@@ -647,7 +647,7 @@ + //casting numeric_limits<ptrdiff_t>::max to streamsize only works is ptrdiff_t is signed or streamsize representation + //is larger than ptrdiff_t one. + _STLP_STATIC_ASSERT((sizeof(streamsize) > sizeof(ptrdiff_t)) || +- (sizeof(streamsize) == sizeof(ptrdiff_t)) && numeric_limits<ptrdiff_t>::is_signed) ++ ((sizeof(streamsize) == sizeof(ptrdiff_t)) && numeric_limits<ptrdiff_t>::is_signed)) + ptrdiff_t __request = __STATIC_CAST(ptrdiff_t, (min) (__STATIC_CAST(streamsize, (numeric_limits<ptrdiff_t>::max)()), _Num - __n)); + + const _CharT* __p = __scan_delim(__first, __last); +--- STLport-5.1.5.orig/stlport/stl/_locale.h ++++ STLport-5.1.5/stlport/stl/_locale.h +@@ -308,11 +308,11 @@ + #endif + + template <class _Facet> +-bool _HasFacet(const locale& __loc, const _Facet* __facet) _STLP_NOTHROW ++bool _HasFacet(const locale& __loc, const _Facet*) _STLP_NOTHROW + { return (__loc._M_get_facet(_Facet::id) != 0); } + + template <class _Facet> +-_Facet* _UseFacet(const locale& __loc, const _Facet* __facet) ++_Facet* _UseFacet(const locale& __loc, const _Facet*) + { return __STATIC_CAST(_Facet*, __loc._M_use_facet(_Facet::id)); } + + _STLP_END_NAMESPACE +--- STLport-5.1.5.orig/stlport/stl/_algo.c ++++ STLport-5.1.5/stlport/stl/_algo.c +@@ -1342,7 +1342,7 @@ + template <class _ForwardIter, class _Tp, + class _Compare1, class _Compare2, class _Distance> + _ForwardIter __upper_bound(_ForwardIter __first, _ForwardIter __last, const _Tp& __val, +- _Compare1 __comp1, _Compare2 __comp2, _Distance*) { ++ _Compare1 _STLP_VERBOSE_PARAM(__comp1), _Compare2 __comp2, _Distance*) { + _Distance __len = distance(__first, __last); + _Distance __half; + +--- STLport-5.1.5.orig/stlport/stl/_algobase.c ++++ STLport-5.1.5/stlport/stl/_algobase.c +@@ -371,7 +371,7 @@ + + template <class _ForwardIter, class _Tp, class _Compare1, class _Compare2, class _Distance> + _ForwardIter __lower_bound(_ForwardIter __first, _ForwardIter __last, const _Tp& __val, +- _Compare1 __comp1, _Compare2 __comp2, _Distance*) { ++ _Compare1 __comp1, _Compare2 _STLP_VERBOSE_PARAM(__comp2), _Distance*) { + _Distance __len = distance(__first, __last); + _Distance __half; + _ForwardIter __middle; +--- STLport-5.1.5.orig/stlport/stl/config/features.h ++++ STLport-5.1.5/stlport/stl/config/features.h +@@ -415,6 +415,7 @@ + + #if !defined (_STLP_DEBUG) + # define _STLP_VERBOSE_ASSERT(expr,diagnostic) ++# define _STLP_VERBOSE_PARAM(param) + # define _STLP_DEBUG_CHECK(expr) + # define _STLP_DEBUG_DO(expr) + #endif +--- STLport-5.1.5.orig/stlport/stl/debug/_debug.h ++++ STLport-5.1.5/stlport/stl/debug/_debug.h +@@ -184,6 +184,7 @@ + } + # endif + ++# define _STLP_VERBOSE_PARAM(param) param + # define _STLP_DEBUG_CHECK(expr) _STLP_ASSERT(expr) + # define _STLP_DEBUG_DO(expr) expr; + +--- STLport-5.1.5.orig/src/strstream.cpp ++++ STLport-5.1.5/src/strstream.cpp +@@ -266,11 +266,12 @@ + } + + void strstreambuf::_M_free(char* p) { +- if (p) ++ if (p) { + if (_M_free_fun) + _M_free_fun(p); + else + delete[] p; ++ } + } + + void strstreambuf::_M_setup(char* get, char* put, streamsize n) { |