File tree Expand file tree Collapse file tree 7 files changed +13
-10
lines changed
Expand file tree Collapse file tree 7 files changed +13
-10
lines changed Original file line number Diff line number Diff line change @@ -140,9 +140,9 @@ namespace detail
140140 // https://svn.boost.org/trac/boost/ticket/5803
141141 // typedef typename assertion<mpl::not_<is_same<Default,Fn> > >::failed test0;
142142# if !BOOST_WORKAROUND(__MWERKS__, <= 0x2407)
143- typedef typename assertion<is_polymorphic<T> >::failed test1;
143+ typedef typename assertion<is_polymorphic<T> >::failed test1 BOOST_ATTRIBUTE_UNUSED ;
144144# endif
145- typedef typename assertion<is_member_function_pointer<Fn> >::failed test2;
145+ typedef typename assertion<is_member_function_pointer<Fn> >::failed test2 BOOST_ATTRIBUTE_UNUSED ;
146146 not_a_derived_class_member<Default>(Fn ());
147147 }
148148 };
Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ namespace detail
3737 // Must not try to use default implementations except with method definitions.
3838 typedef typename error::multiple_functions_passed_to_def<
3939 Helper::has_default_implementation
40- >::type assertion;
40+ >::type assertion BOOST_ATTRIBUTE_UNUSED ;
4141
4242 detail::scope_setattr_doc (
4343 name, boost::python::make_function (
Original file line number Diff line number Diff line change 135135#define BOOST_PYTHON_SUPPORTS_PY_SIGNATURES // enables smooth transition
136136#endif
137137
138+ #if !defined(BOOST_ATTRIBUTE_UNUSED) && defined(__GNUC__) && (__GNUC__ >= 4)
139+ # define BOOST_ATTRIBUTE_UNUSED __attribute__ ((unused))
140+ #endif
141+
138142#endif // CONFIG_DWA052200_H_
Original file line number Diff line number Diff line change @@ -213,7 +213,7 @@ namespace detail
213213 { \
214214 typedef typename ::boost::python::detail:: \
215215 error::more_keywords_than_function_arguments< \
216- N,n_args>::too_many_keywords assertion; \
216+ N,n_args>::too_many_keywords assertion BOOST_ATTRIBUTE_UNUSED; \
217217 } \
218218 template <std::size_t N> \
219219 fstubs_name (::boost::python::detail::keywords<N> const & keywords, char const * doc = 0 ) \
@@ -222,7 +222,7 @@ namespace detail
222222 { \
223223 typedef typename ::boost::python::detail:: \
224224 error::more_keywords_than_function_arguments< \
225- N,n_args>::too_many_keywords assertion; \
225+ N,n_args>::too_many_keywords assertion BOOST_ATTRIBUTE_UNUSED; \
226226 }
227227
228228# if defined(BOOST_NO_VOID_RETURNS)
Original file line number Diff line number Diff line change @@ -68,7 +68,7 @@ namespace detail
6868 template <int keywords, int init_args>
6969 struct more_keywords_than_init_arguments
7070 {
71- typedef char too_many_keywords[init_args - keywords >= 0 ? 1 : -1 ];
71+ typedef char too_many_keywords[init_args - keywords >= 0 ? 1 : -1 ] BOOST_ATTRIBUTE_UNUSED ;
7272 };
7373 }
7474
@@ -224,7 +224,7 @@ class init : public init_base<init<BOOST_PYTHON_OVERLOAD_ARGS> >
224224 {
225225 typedef typename detail::error::more_keywords_than_init_arguments<
226226 N, n_arguments::value + 1
227- >::too_many_keywords assertion;
227+ >::too_many_keywords assertion BOOST_ATTRIBUTE_UNUSED ;
228228 }
229229
230230 template <std::size_t N>
@@ -233,7 +233,7 @@ class init : public init_base<init<BOOST_PYTHON_OVERLOAD_ARGS> >
233233 {
234234 typedef typename detail::error::more_keywords_than_init_arguments<
235235 N, n_arguments::value + 1
236- >::too_many_keywords assertion;
236+ >::too_many_keywords assertion BOOST_ATTRIBUTE_UNUSED ;
237237 }
238238
239239 template <class CallPoliciesT >
Original file line number Diff line number Diff line change @@ -174,7 +174,7 @@ namespace detail
174174
175175 typedef typename detail::error::more_keywords_than_function_arguments<
176176 NumKeywords::value, arity
177- >::too_many_keywords assertion;
177+ >::too_many_keywords assertion BOOST_ATTRIBUTE_UNUSED ;
178178
179179 typedef typename outer_constructor_signature<Sig>::type outer_signature;
180180
Original file line number Diff line number Diff line change @@ -38,7 +38,6 @@ void assert_destructions(int n)
3838int main ()
3939{
4040 assert_destructions (0 );
41- typedef int a[2 ];
4241
4342 foo* f1 = new foo;
4443 boost::python::detail::destroy_referent<foo const volatile &>(f1);
You can’t perform that action at this time.
0 commit comments