2
0
mirror of https://github.com/boostorg/python.git synced 2026-01-19 04:22:16 +00:00

Suppress more unused typedef warnings.

This commit is contained in:
Stefan Seefeld
2016-06-24 17:22:17 -04:00
parent b3e9290599
commit 2e8cd3d8f2
7 changed files with 13 additions and 10 deletions

View File

@@ -140,9 +140,9 @@ namespace detail
// https://svn.boost.org/trac/boost/ticket/5803
//typedef typename assertion<mpl::not_<is_same<Default,Fn> > >::failed test0;
# if !BOOST_WORKAROUND(__MWERKS__, <= 0x2407)
typedef typename assertion<is_polymorphic<T> >::failed test1;
typedef typename assertion<is_polymorphic<T> >::failed test1 BOOST_ATTRIBUTE_UNUSED;
# endif
typedef typename assertion<is_member_function_pointer<Fn> >::failed test2;
typedef typename assertion<is_member_function_pointer<Fn> >::failed test2 BOOST_ATTRIBUTE_UNUSED;
not_a_derived_class_member<Default>(Fn());
}
};

View File

@@ -37,7 +37,7 @@ namespace detail
// Must not try to use default implementations except with method definitions.
typedef typename error::multiple_functions_passed_to_def<
Helper::has_default_implementation
>::type assertion;
>::type assertion BOOST_ATTRIBUTE_UNUSED;
detail::scope_setattr_doc(
name, boost::python::make_function(

View File

@@ -135,4 +135,8 @@
#define BOOST_PYTHON_SUPPORTS_PY_SIGNATURES // enables smooth transition
#endif
#if !defined(BOOST_ATTRIBUTE_UNUSED) && defined(__GNUC__) && (__GNUC__ >= 4)
# define BOOST_ATTRIBUTE_UNUSED __attribute__((unused))
#endif
#endif // CONFIG_DWA052200_H_

View File

@@ -213,7 +213,7 @@ namespace detail
{ \
typedef typename ::boost::python::detail:: \
error::more_keywords_than_function_arguments< \
N,n_args>::too_many_keywords assertion; \
N,n_args>::too_many_keywords assertion BOOST_ATTRIBUTE_UNUSED; \
} \
template <std::size_t N> \
fstubs_name(::boost::python::detail::keywords<N> const& keywords, char const* doc = 0) \
@@ -222,7 +222,7 @@ namespace detail
{ \
typedef typename ::boost::python::detail:: \
error::more_keywords_than_function_arguments< \
N,n_args>::too_many_keywords assertion; \
N,n_args>::too_many_keywords assertion BOOST_ATTRIBUTE_UNUSED; \
}
# if defined(BOOST_NO_VOID_RETURNS)

View File

@@ -68,7 +68,7 @@ namespace detail
template <int keywords, int init_args>
struct more_keywords_than_init_arguments
{
typedef char too_many_keywords[init_args - keywords >= 0 ? 1 : -1];
typedef char too_many_keywords[init_args - keywords >= 0 ? 1 : -1] BOOST_ATTRIBUTE_UNUSED;
};
}
@@ -224,7 +224,7 @@ class init : public init_base<init<BOOST_PYTHON_OVERLOAD_ARGS> >
{
typedef typename detail::error::more_keywords_than_init_arguments<
N, n_arguments::value + 1
>::too_many_keywords assertion;
>::too_many_keywords assertion BOOST_ATTRIBUTE_UNUSED;
}
template <std::size_t N>
@@ -233,7 +233,7 @@ class init : public init_base<init<BOOST_PYTHON_OVERLOAD_ARGS> >
{
typedef typename detail::error::more_keywords_than_init_arguments<
N, n_arguments::value + 1
>::too_many_keywords assertion;
>::too_many_keywords assertion BOOST_ATTRIBUTE_UNUSED;
}
template <class CallPoliciesT>

View File

@@ -174,7 +174,7 @@ namespace detail
typedef typename detail::error::more_keywords_than_function_arguments<
NumKeywords::value, arity
>::too_many_keywords assertion;
>::too_many_keywords assertion BOOST_ATTRIBUTE_UNUSED;
typedef typename outer_constructor_signature<Sig>::type outer_signature;

View File

@@ -38,7 +38,6 @@ void assert_destructions(int n)
int main()
{
assert_destructions(0);
typedef int a[2];
foo* f1 = new foo;
boost::python::detail::destroy_referent<foo const volatile&>(f1);