[libcxx] r246280 - Fix most GCC warnings during build. Only -Wattribute left.
Eric Fiselier via cfe-commits
cfe-commits at lists.llvm.org
Fri Aug 28 00:02:43 PDT 2015
Author: ericwf
Date: Fri Aug 28 02:02:42 2015
New Revision: 246280
URL: http://llvm.org/viewvc/llvm-project?rev=246280&view=rev
Log:
Fix most GCC warnings during build. Only -Wattribute left.
Modified:
libcxx/trunk/include/string
libcxx/trunk/include/system_error
Modified: libcxx/trunk/include/string
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/string?rev=246280&r1=246279&r2=246280&view=diff
==============================================================================
--- libcxx/trunk/include/string (original)
+++ libcxx/trunk/include/string Fri Aug 28 02:02:42 2015
@@ -1444,7 +1444,8 @@ public:
_LIBCPP_INLINE_VISIBILITY size_type length() const _NOEXCEPT {return size();}
_LIBCPP_INLINE_VISIBILITY size_type max_size() const _NOEXCEPT;
_LIBCPP_INLINE_VISIBILITY size_type capacity() const _NOEXCEPT
- {return (__is_long() ? __get_long_cap() : __min_cap) - 1;}
+ {return (__is_long() ? __get_long_cap()
+ : static_cast<size_type>(__min_cap)) - 1;}
void resize(size_type __n, value_type __c);
_LIBCPP_INLINE_VISIBILITY void resize(size_type __n) {resize(__n, value_type());}
@@ -1784,11 +1785,11 @@ private:
template <size_type __a> static
_LIBCPP_INLINE_VISIBILITY
size_type __align_it(size_type __s) _NOEXCEPT
- {return __s + (__a-1) & ~(__a-1);}
+ {return (__s + (__a-1)) & ~(__a-1);}
enum {__alignment = 16};
static _LIBCPP_INLINE_VISIBILITY
size_type __recommend(size_type __s) _NOEXCEPT
- {return (__s < __min_cap ? __min_cap :
+ {return (__s < __min_cap ? static_cast<size_type>(__min_cap) :
__align_it<sizeof(value_type) < __alignment ?
__alignment/sizeof(value_type) : 1 > (__s+1)) - 1;}
Modified: libcxx/trunk/include/system_error
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/system_error?rev=246280&r1=246279&r2=246280&view=diff
==============================================================================
--- libcxx/trunk/include/system_error (original)
+++ libcxx/trunk/include/system_error Fri Aug 28 02:02:42 2015
@@ -371,7 +371,7 @@ public:
error_category() _NOEXCEPT;
#else
_LIBCPP_ALWAYS_INLINE
- _LIBCPP_CONSTEXPR_AFTER_CXX11 error_category() _NOEXCEPT _LIBCPP_DEFAULT;
+ _LIBCPP_CONSTEXPR_AFTER_CXX11 error_category() _NOEXCEPT _LIBCPP_DEFAULT
#endif
private:
error_category(const error_category&);// = delete;
More information about the cfe-commits
mailing list