This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: [RFT] libffi testsuite cleanup warnings
- From: Rainer Orth <ro at TechFak dot Uni-Bielefeld dot DE>
- To: Andreas Tobler <toa at pop dot agri dot ch>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, Java Patches <java-patches at gcc dot gnu dot org>
- Date: 27 Feb 2006 13:30:31 +0100
- Subject: Re: [RFT] libffi testsuite cleanup warnings
- References: <4400D882.7040101@pop.agri.ch>
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