Add attribute((unused)) in libstdc++ headers

* include/bits/locale_facets.h (ctype::do_narrow): Add attribute to
	unused parameter.
	* include/bits/regex_automaton.h (_NFA::_M_insert_alt): Likewise.

From-SVN: r235152
This commit is contained in:
Jonathan Wakely 2016-04-18 16:44:12 +01:00 committed by Jonathan Wakely
parent 8dc1e574ae
commit 6b6147dd48
3 changed files with 8 additions and 3 deletions

View File

@ -1,5 +1,9 @@
2016-04-18 Jonathan Wakely <jwakely@redhat.com>
* include/bits/locale_facets.h (ctype::do_narrow): Add attribute to
unused parameter.
* include/bits/regex_automaton.h (_NFA::_M_insert_alt): Likewise.
* include/ext/string_conversions.h (__stoa): Avoid -Wsign-compare
warnings.

View File

@ -1128,7 +1128,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
* @return The converted char.
*/
virtual char
do_narrow(char_type __c, char __dfault) const
do_narrow(char_type __c, char __dfault __attribute__((__unused__))) const
{ return __c; }
/**
@ -1155,7 +1155,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
*/
virtual const char_type*
do_narrow(const char_type* __lo, const char_type* __hi,
char __dfault, char* __to) const
char __dfault __attribute__((__unused__)), char* __to) const
{
__builtin_memcpy(__to, __lo, __hi - __lo);
return __hi;

View File

@ -241,7 +241,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
}
_StateIdT
_M_insert_alt(_StateIdT __next, _StateIdT __alt, bool __neg)
_M_insert_alt(_StateIdT __next, _StateIdT __alt,
bool __neg __attribute__((__unused__)))
{
_StateT __tmp(_S_opcode_alternative);
// It labels every quantifier to make greedy comparison easier in BFS