aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Salyzyn <salyzyn@google.com>2014-04-29 15:00:11 -0700
committerMark Salyzyn <salyzyn@google.com>2014-04-29 17:16:07 -0700
commit0e7a705cd6f755153c1f2cceb09af1e515ca9f1d (patch)
tree0b3d812e0997258dd24c658115466bae8f1d2c5d
parent6003041ad7f1abbdf83b10ef22f863a03752c61c (diff)
downloadstlport-0e7a705cd6f755153c1f2cceb09af1e515ca9f1d.tar.gz
stlport: deal with compile warnings
- In preparation for dependent projects to turn on -Werror and -Wunused Change-Id: Ibf1b146d8d389e8747ba1ea1735cb55722b85971
-rw-r--r--src/locale.cpp3
-rw-r--r--stlport/stl/_istream.c1
-rw-r--r--stlport/stl/_messages_facets.h12
-rw-r--r--stlport/stl/_slist.c1
-rw-r--r--stlport/stl/_stdexcept_base.c2
-rw-r--r--stlport/stl/_time_facets.c5
-rw-r--r--stlport/stl/config/features.h2
7 files changed, 12 insertions, 14 deletions
diff --git a/src/locale.cpp b/src/locale.cpp
index 5564a6e..8d724f5 100644
--- a/src/locale.cpp
+++ b/src/locale.cpp
@@ -249,8 +249,9 @@ locale::locale(const locale& L, const char* name, locale::category c)
if (!name)
_M_throw_on_null_name();
- if (!::strcmp(_Nameless, name))
+ if (!::strcmp(_Nameless, name)) {
_STLP_THROW(runtime_error("Invalid locale name '" _NAMELESS "'"));
+ }
_Locale_impl* impl = 0;
diff --git a/stlport/stl/_istream.c b/stlport/stl/_istream.c
index 7fc2f04..ae66a99 100644
--- a/stlport/stl/_istream.c
+++ b/stlport/stl/_istream.c
@@ -1159,7 +1159,6 @@ basic_istream<_CharT, _Traits>::ignore(streamsize __n, int_type __delim) {
if (__sentry) {
basic_streambuf<_CharT, _Traits>* __buf = this->rdbuf();
- typedef _STLP_PRIV _Constant_unary_fun<bool, int_type> _Const_bool;
typedef _STLP_PRIV _Constant_binary_fun<streamsize, streamsize, streamsize>
_Const_streamsize;
const streamsize __maxss = (numeric_limits<streamsize>::max)();
diff --git a/stlport/stl/_messages_facets.h b/stlport/stl/_messages_facets.h
index aca5596..795570c 100644
--- a/stlport/stl/_messages_facets.h
+++ b/stlport/stl/_messages_facets.h
@@ -73,12 +73,12 @@ public:
protected:
~messages() {}
- virtual catalog do_open(const string& __fn, const locale& __loc) const
+ virtual catalog do_open(const string& /*__fn*/, const locale& /*__loc*/) const
{ return -1; }
- virtual string_type do_get(catalog __c, int __set, int __msgid,
+ virtual string_type do_get(catalog /*__c*/, int /*__set*/, int /*__msgid*/,
const string_type& __dfault) const
{ return __dfault; }
- virtual void do_close(catalog __c) const
+ virtual void do_close(catalog /*__c*/) const
{}
};
@@ -106,12 +106,12 @@ public:
protected:
~messages() {}
- virtual catalog do_open(const string& __fn, const locale& __loc) const
+ virtual catalog do_open(const string& /*__fn*/, const locale& /*__loc*/) const
{ return -1; }
- virtual string_type do_get(catalog __c, int __set, int __msgid,
+ virtual string_type do_get(catalog /*__c*/, int /*__set*/, int /*__msgid*/,
const string_type& __dfault) const
{ return __dfault; }
- virtual void do_close(catalog __c) const
+ virtual void do_close(catalog /*__c*/) const
{}
};
diff --git a/stlport/stl/_slist.c b/stlport/stl/_slist.c
index ba158d0..107b600 100644
--- a/stlport/stl/_slist.c
+++ b/stlport/stl/_slist.c
@@ -148,7 +148,6 @@ template <class _Tp, class _Alloc, class _StrictWeakOrdering>
void _Slist_merge(slist<_Tp, _Alloc>& __that, slist<_Tp, _Alloc>& __x,
_StrictWeakOrdering __comp) {
typedef _Slist_node<_Tp> _Node;
- typedef _STLP_PRIV _Slist_node_base _Node_base;
if (__that.get_allocator() == __x.get_allocator()) {
typename slist<_Tp, _Alloc>::iterator __ite(__that.before_begin());
while (__ite._M_node->_M_next && !__x.empty()) {
diff --git a/stlport/stl/_stdexcept_base.c b/stlport/stl/_stdexcept_base.c
index deb7056..d03c1aa 100644
--- a/stlport/stl/_stdexcept_base.c
+++ b/stlport/stl/_stdexcept_base.c
@@ -64,7 +64,7 @@ __Named_exception::__Named_exception(const __Named_exception& __x) {
__Named_exception& __Named_exception::operator = (const __Named_exception& __x) {
size_t __size = strlen(__x._M_name) + 1;
- size_t __buf_size = _M_name != _M_static_name ? *(__REINTERPRET_CAST(size_t*, &_M_static_name[0])) : _S_bufsize;
+ size_t __buf_size = _M_name != _M_static_name ? *(__REINTERPRET_CAST(size_t*, &_M_static_name[0])) : __STATIC_CAST(size_t,_S_bufsize);
if (__size > __buf_size) {
// Being here necessarily mean that we need to allocate a buffer:
if (_M_name != _M_static_name) free(_M_name);
diff --git a/stlport/stl/_time_facets.c b/stlport/stl/_time_facets.c
index f403817..c4f74ce 100644
--- a/stlport/stl/_time_facets.c
+++ b/stlport/stl/_time_facets.c
@@ -151,7 +151,6 @@ __get_formatted_time _STLP_WEAK (_InIt1 __first, _InIt1 __last,
_Ch*, const _TimeInfo& __table,
const ios_base& __s, ios_base::iostate& __err, tm* __t) {
const ctype<_Ch>& __ct = use_facet<ctype<_Ch> >(__s.getloc());
- typedef basic_string<_Ch, char_traits<_Ch>, allocator<_Ch> > string_type;
size_t offset;
while (__first != __last && __format != __format_end) {
@@ -366,7 +365,7 @@ time_get<_Ch, _InIt>::do_get_year(_InIt __s, _InIt __end,
template <class _Ch, class _InIt>
_InIt
time_get<_Ch, _InIt>::do_get_weekday(_InIt __s, _InIt __end,
- ios_base &__str, ios_base::iostate &__err,
+ ios_base& /*__str*/, ios_base::iostate &__err,
tm *__t) const {
bool __result =
_STLP_PRIV __get_short_or_long_dayname(__s, __end, this->_M_timeinfo, __t);
@@ -383,7 +382,7 @@ time_get<_Ch, _InIt>::do_get_weekday(_InIt __s, _InIt __end,
template <class _Ch, class _InIt>
_InIt
time_get<_Ch, _InIt>::do_get_monthname(_InIt __s, _InIt __end,
- ios_base &__str, ios_base::iostate &__err,
+ ios_base& /*__str*/, ios_base::iostate &__err,
tm *__t) const {
bool __result =
_STLP_PRIV __get_short_or_long_monthname(__s, __end, this->_M_timeinfo, __t);
diff --git a/stlport/stl/config/features.h b/stlport/stl/config/features.h
index 5928ded..b615041 100644
--- a/stlport/stl/config/features.h
+++ b/stlport/stl/config/features.h
@@ -314,7 +314,7 @@
/* Some compiler support 0 size array so we use negative size array to generate
* a compilation time error.
*/
-# define _STLP_STATIC_ASSERT(expr) typedef char __static_assert[expr ? 1 : -1];
+# define _STLP_STATIC_ASSERT(expr) typedef char __static_assert[expr ? 1 : -1] __attribute__((__unused__));
#endif
/* apple mpw exception handling bug */