This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFT] libffi testsuite cleanup warnings


Andreas Tobler <toa@pop.agri.ch> writes:

> 2006-02-25  Andreas Tobler  <a.tobler@schweiz.ch>
> 
> 	* testsuite/libffi.call/closure_fn0.c: Clean up warnings discovered by
> 	-W -Wall.

I think it would be much more useful to describe the actual changes here
instead of how you discovered that they are necessary/useful.

> [2 ffi_test_warn2.diff <text/plain>]
> Index: testsuite/libffi.call/closure_fn0.c
> ===================================================================
> --- testsuite/libffi.call/closure_fn0.c	(revision 111437)
> +++ testsuite/libffi.call/closure_fn0.c	(working copy)
> @@ -10,7 +10,8 @@
>  #include "ffitest.h"
>  
>  static void
> -closure_test_fn0(ffi_cif* cif,void* resp,void** args, void* userdata)
> +closure_test_fn0(ffi_cif* cif __attribute__ ((unused)), void* resp, void** args,
> +		 void* userdata)
>  {
>    *(ffi_arg*)resp =
>      (int)*(unsigned long long *)args[0] + (int)(*(int *)args[1]) +

It may be useful to use some macro that expands to __attribte__ ((unused))
when using GCC here instead of hardcoding it directly: libffi used to be
usable with non-GCC compilers (I think there's a PR open to restore this
ability in the GCC copy), and I'd appreciate if it remained that way (or at
least doesn't become less so if it's avoidable).

Thanks.
	Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Faculty of Technology, Bielefeld University


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]