aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Hsieh <andrewhsieh@google.com>2013-08-13 21:07:51 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2013-08-13 21:07:51 -0700
commitff7379b5293413f0287b2b659a0d2bc905fd449c (patch)
tree7088e83b3fc4ea6f680e396ddd11218041fc6868
parent55b4f3e0ca28a1959cffadd10ec503f2f6eeadeb (diff)
parenta6061104795167e1bb7e625ef76014ca1021a067 (diff)
downloadstlport-ff7379b5293413f0287b2b659a0d2bc905fd449c.tar.gz
am a6061104: Merge "Fixed build errors originated from stlport"
* commit 'a6061104795167e1bb7e625ef76014ca1021a067': Fixed build errors originated from stlport
-rw-r--r--stlport/stl/_algo.c2
-rw-r--r--stlport/stl/_algobase.c4
-rw-r--r--stlport/stl/_alloc.h2
-rw-r--r--stlport/stl/_string.c2
-rw-r--r--stlport/stl/_threads.c4
-rw-r--r--stlport/stl/config/features.h6
6 files changed, 13 insertions, 7 deletions
diff --git a/stlport/stl/_algo.c b/stlport/stl/_algo.c
index b58b92d..c1b1921 100644
--- a/stlport/stl/_algo.c
+++ b/stlport/stl/_algo.c
@@ -1354,7 +1354,7 @@ _STLP_MOVE_TO_PRIV_NAMESPACE
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_UNUSED(__comp1), _Compare2 __comp2, _Distance*) {
_Distance __len = _STLP_STD::distance(__first, __last);
_Distance __half;
diff --git a/stlport/stl/_algobase.c b/stlport/stl/_algobase.c
index 157e25c..2748dfb 100644
--- a/stlport/stl/_algobase.c
+++ b/stlport/stl/_algobase.c
@@ -326,7 +326,7 @@ inline _InputIter __find_first_of_aux2(_InputIter __first1, _InputIter __last1,
template <class _InputIter, class _ForwardIter, class _Tp1, class _Tp2>
inline _InputIter __find_first_of_aux1(_InputIter __first1, _InputIter __last1,
_ForwardIter __first2, _ForwardIter __last2,
- _Tp1* __pt1, _Tp2* __pt2) {
+ _Tp1* _STLP_UNUSED(__pt1), _Tp2* __pt2) {
typedef _STLP_TYPENAME _STLP_STD::_IsIntegral<_Tp1>::_Ret _IsIntegral;
typedef _STLP_TYPENAME _STLP_PRIV _IsCharLikeType<_Tp2>::_Ret _IsCharLike;
typedef _STLP_TYPENAME _STLP_STD::_Land2<_IsIntegral, _IsCharLike>::_Ret _UseStrcspnLikeAlgo;
@@ -451,7 +451,7 @@ _STLP_MOVE_TO_PRIV_NAMESPACE
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_UNUSED(__comp2), _Distance*) {
_Distance __len = _STLP_STD::distance(__first, __last);
_Distance __half;
_ForwardIter __middle;
diff --git a/stlport/stl/_alloc.h b/stlport/stl/_alloc.h
index 09b8af5..245e0db 100644
--- a/stlport/stl/_alloc.h
+++ b/stlport/stl/_alloc.h
@@ -292,7 +292,7 @@ public:
#endif
allocator(const allocator<_Tp>&) _STLP_NOTHROW {}
#if !defined (_STLP_NO_MOVE_SEMANTIC)
- allocator(__move_source<allocator<_Tp> > src) _STLP_NOTHROW {}
+ allocator(__move_source<allocator<_Tp> > _STLP_UNUSED(src)) _STLP_NOTHROW {}
#endif
~allocator() _STLP_NOTHROW {}
pointer address(reference __x) const {return &__x;}
diff --git a/stlport/stl/_string.c b/stlport/stl/_string.c
index ae55092..2320d83 100644
--- a/stlport/stl/_string.c
+++ b/stlport/stl/_string.c
@@ -110,7 +110,7 @@ inline _InputIter __str_find_first_not_of_aux3(_InputIter __first1, _InputIter _
template <class _InputIter, class _CharT, class _Tp, class _Traits>
inline _InputIter __str_find_first_not_of_aux2(_InputIter __first1, _InputIter __last1,
const _CharT* __first2, const _CharT* __last2,
- _Tp* __pt, _Traits* __traits) {
+ _Tp* _STLP_UNUSED(__pt), _Traits* __traits) {
typedef typename _IsIntegral<_Tp>::_Ret _IsIntegral;
typedef typename _IsCharLikeType<_CharT>::_Ret _IsCharLike;
typedef typename _Land2<_IsIntegral, _IsCharLike>::_Ret _UseStrcspnLikeAlgo;
diff --git a/stlport/stl/_threads.c b/stlport/stl/_threads.c
index ea3c0b9..b79e188 100644
--- a/stlport/stl/_threads.c
+++ b/stlport/stl/_threads.c
@@ -73,7 +73,7 @@ extern "C" int __nanosleep(const struct timespec*, struct timespec*);
template <int __inst>
void _STLP_CALL
-_STLP_mutex_spin<__inst>::_S_nsec_sleep(int __log_nsec, unsigned int& __iteration) {
+_STLP_mutex_spin<__inst>::_S_nsec_sleep(int __log_nsec, unsigned int& _STLP_UNUSED(__iteration)) {
# if defined (_STLP_WIN32THREADS)
# if defined (_WIN32_WINNT) && (_WIN32_WINNT >= 0x0400)
if (__iteration <= 4000) {
@@ -115,7 +115,7 @@ _STLP_mutex_spin<__inst>::_S_nsec_sleep(int __log_nsec, unsigned int& __iteratio
template <int __inst>
void _STLP_CALL
-_STLP_mutex_spin<__inst>::_M_do_lock(volatile __stl_atomic_t* __lock) {
+_STLP_mutex_spin<__inst>::_M_do_lock(volatile __stl_atomic_t* _STLP_UNUSED(__lock)) {
# if defined(_STLP_ATOMIC_EXCHANGE)
if (_Atomic_swap(__lock, 1)) {
unsigned __my_spin_max = _STLP_mutex_spin<0>::__max;
diff --git a/stlport/stl/config/features.h b/stlport/stl/config/features.h
index c1eb53c..5928ded 100644
--- a/stlport/stl/config/features.h
+++ b/stlport/stl/config/features.h
@@ -62,6 +62,12 @@
*/
#include <stl/config/user_config.h>
+#ifdef __GNUC__
+# define _STLP_UNUSED(x) x __attribute__((unused))
+#else
+# define _STLP_UNUSED(x) x
+#endif /* __GNUC__ */
+
#if defined (_STLP_DEBUG) && !defined (_STLP_DEBUG_LEVEL)
# define _STLP_DEBUG_LEVEL _STLP_STLPORT_DBG_LEVEL
#endif