This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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


Rainer Orth wrote:
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.

Here is what I committed. I hope you appreciate the CL.

Andreas

2006-03-01 Andreas Tobler <a.tobler@schweiz.ch>

	* testsuite/libffi.special/unwindtest.cc (closure_test_fn): Mark cif,
	args and userdata unused.
	(closure_test_fn1): Mark cif and userdata unused.
	(main): Remove unused res.

2006-02-28 Andreas Tobler <a.tobler@schweiz.ch>

	* testsuite/libffi.call/call.exp: Adjust FSF address. Add test runs for
	-O2, -O3, -Os and the warning flags -W -Wall.
	* testsuite/libffi.special/special.exp: Likewise.
	* testsuite/libffi.call/ffitest.h: Add an __UNUSED__ macro to mark
	unused parameter unused for gcc or else do nothing.
	* testsuite/libffi.special/ffitestcxx.h: Likewise.
	* testsuite/libffi.call/cls_12byte.c (cls_struct_12byte_gn): Mark cif
	and userdata unused.
	* testsuite/libffi.call/cls_16byte.c (cls_struct_16byte_gn): Likewise.
	* testsuite/libffi.call/cls_18byte.c (cls_struct_18byte_gn): Likewise.
	* testsuite/libffi.call/cls_19byte.c (cls_struct_19byte_gn): Likewise.
	* testsuite/libffi.call/cls_1_1byte.c (cls_struct_1_1byte_gn): Likewise.
	* testsuite/libffi.call/cls_20byte.c (cls_struct_20byte_gn): Likewise.
	* testsuite/libffi.call/cls_20byte1.c (cls_struct_20byte_gn): Likewise.
	* testsuite/libffi.call/cls_24byte.c (cls_struct_24byte_gn): Likewise.
	* testsuite/libffi.call/cls_2byte.c (cls_struct_2byte_gn): Likewise.
	* testsuite/libffi.call/cls_3_1byte.c (cls_struct_3_1byte_gn): Likewise.
	* testsuite/libffi.call/cls_3byte1.c (cls_struct_3byte_gn): Likewise.
	* testsuite/libffi.call/cls_3byte2.c (cls_struct_3byte_gn1): Likewise.
	* testsuite/libffi.call/cls_4_1byte.c (cls_struct_4_1byte_gn): Likewise.
	* testsuite/libffi.call/cls_4byte.c (cls_struct_4byte_gn): Likewise.
	* testsuite/libffi.call/cls_5_1_byte.c (cls_struct_5byte_gn): Likewise.
	* testsuite/libffi.call/cls_5byte.c (cls_struct_5byte_gn): Likewise.
	* testsuite/libffi.call/cls_64byte.c (cls_struct_64byte_gn): Likewise.
	* testsuite/libffi.call/cls_6_1_byte.c (cls_struct_6byte_gn): Likewise.
	* testsuite/libffi.call/cls_6byte.c (cls_struct_6byte_gn): Likewise.
	* testsuite/libffi.call/cls_7_1_byte.c (cls_struct_7byte_gn): Likewise.
	* testsuite/libffi.call/cls_7byte.c (cls_struct_7byte_gn): Likewise.
	* testsuite/libffi.call/cls_8byte.c (cls_struct_8byte_gn): Likewise.
	* testsuite/libffi.call/cls_9byte1.c (cls_struct_9byte_gn): Likewise.
	* testsuite/libffi.call/cls_9byte2.c (cls_struct_9byte_gn): Likewise.
	* testsuite/libffi.call/cls_align_double.c (cls_struct_align_gn):
	Likewise.
	* testsuite/libffi.call/cls_align_float.c (cls_struct_align_gn):
	Likewise.
	* testsuite/libffi.call/cls_align_longdouble.c (cls_struct_align_gn):
	Likewise.
	* testsuite/libffi.call/cls_align_pointer.c (cls_struct_align_fn): Cast
	void* to avoid compiler warning.
	(main): Likewise.
	(cls_struct_align_gn): Mark cif and userdata unused.
	* testsuite/libffi.call/cls_align_sint16.c (cls_struct_align_gn):
	Likewise.
	* testsuite/libffi.call/cls_align_sint32.c (cls_struct_align_gn):
	Likewise.
	* testsuite/libffi.call/cls_align_sint64.c (cls_struct_align_gn):
	Likewise.
	* testsuite/libffi.call/cls_align_uint16.c (cls_struct_align_gn):
	Likewise.
	* testsuite/libffi.call/cls_align_uint32.c (cls_struct_align_gn):
	Likewise.
	* testsuite/libffi.call/cls_double.c (cls_ret_double_fn): Likewise.
	* testsuite/libffi.call/cls_float.c (cls_ret_float_fn): Likewise.
	* testsuite/libffi.call/cls_multi_schar.c (test_func_gn): Mark cif and
	data unused.
	(main): Cast res_call to silence gcc.
	* testsuite/libffi.call/cls_multi_sshort.c (test_func_gn): Mark cif and
	data unused.
	(main): Cast res_call to silence gcc.
	* testsuite/libffi.call/cls_multi_sshortchar.c (test_func_gn): Mark cif
	and data unused.
	(main): Cast res_call to silence gcc.
	* testsuite/libffi.call/cls_multi_uchar.c (test_func_gn): Mark cif and
	data unused.
	(main): Cast res_call to silence gcc.
	* testsuite/libffi.call/cls_multi_ushort.c (test_func_gn): Mark cif and
	data unused.
	(main): Cast res_call to silence gcc.
	* testsuite/libffi.call/cls_multi_ushortchar.c (test_func_gn): Mark cif
	and data unused.
	(main): Cast res_call to silence gcc.
	* testsuite/libffi.call/cls_schar.c (cls_ret_schar_fn): Mark cif and
	userdata unused.
	(cls_ret_schar_fn): Cast printf parameter to silence gcc.
	* testsuite/libffi.call/cls_sint.c (cls_ret_sint_fn): Mark cif and
	userdata unused.
	(cls_ret_sint_fn): Cast printf parameter to silence gcc.
	* testsuite/libffi.call/cls_sshort.c (cls_ret_sshort_fn): Mark cif and
	userdata unused.
	(cls_ret_sshort_fn): Cast printf parameter to silence gcc.
	* testsuite/libffi.call/cls_uchar.c (cls_ret_uchar_fn):  Mark cif and
	userdata unused.
	(cls_ret_uchar_fn): Cast printf parameter to silence gcc.
	* testsuite/libffi.call/cls_uint.c (cls_ret_uint_fn): Mark cif and
	userdata unused.
	(cls_ret_uint_fn): Cast printf parameter to silence gcc.
	* testsuite/libffi.call/cls_ulonglong.c (cls_ret_ulonglong_fn): Mark cif
	and userdata unused.
	* testsuite/libffi.call/cls_ushort.c (cls_ret_ushort_fn): Mark cif and
	userdata unused.
	(cls_ret_ushort_fn): Cast printf parameter to silence gcc.
	* testsuite/libffi.call/float.c (floating): Remove unused parameter e.
	* testsuite/libffi.call/float1.c (main): Remove unused variable i.
	Cleanup white spaces.
	* testsuite/libffi.call/negint.c (checking): Remove unused variable i.
	* testsuite/libffi.call/nested_struct.c (cls_struct_combined_gn): Mark
	cif and userdata unused.
	* testsuite/libffi.call/nested_struct1.c (cls_struct_combined_gn):
	Likewise.
	* testsuite/libffi.call/nested_struct10.c (B_gn): Likewise.
	* testsuite/libffi.call/nested_struct2.c (B_fn): Adjust printf
	formatters to silence gcc.
	(B_gn): Mark cif and userdata unused.
	* testsuite/libffi.call/nested_struct3.c (B_gn): Mark cif and userdata
	unused.
	* testsuite/libffi.call/nested_struct4.c: Mention related PR.
	(B_gn): Mark cif and userdata unused.
	* testsuite/libffi.call/nested_struct5.c (B_gn): Mark cif and userdata
	unused.
	* testsuite/libffi.call/nested_struct6.c: Mention related PR.
	(B_gn): Mark cif and userdata unused.
	* testsuite/libffi.call/nested_struct7.c (B_gn): Mark cif and userdata
	unused.
	* testsuite/libffi.call/nested_struct8.c (B_gn): Likewise.
	* testsuite/libffi.call/nested_struct9.c (B_gn): Likewise.
	* testsuite/libffi.call/problem1.c (stub): Likewise.
	* testsuite/libffi.call/pyobjc-tc.c (main): Cast the result to silence
	gcc.
	* testsuite/libffi.call/return_fl2.c (return_fl): Add the note mentioned
	in the last commit for this test case in the test case itself.
	* testsuite/libffi.call/closure_fn0.c (closure_test_fn0): Mark cif as
	unused.
	* testsuite/libffi.call/closure_fn1.c (closure_test_fn1): Likewise.
	* testsuite/libffi.call/closure_fn2.c (closure_test_fn2): Likewise.
	* testsuite/libffi.call/closure_fn3.c (closure_test_fn3): Likewise.
	* testsuite/libffi.call/closure_fn4.c (closure_test_fn0): Likewise.
	* testsuite/libffi.call/closure_fn5.c (closure_test_fn5): Likewise.
	* testsuite/libffi.call/closure_fn6.c (closure_test_fn0): Likewise.
Index: testsuite/libffi.call/call.exp
===================================================================
--- testsuite/libffi.call/call.exp	(revision 111581)
+++ testsuite/libffi.call/call.exp	(working copy)
@@ -1,18 +1,18 @@
-#   Copyright (C) 2003 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2006 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # the Free Software Foundation; either version 2 of the License, or
 # (at your option) any later version.
-# 
+#
 # This program is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
-# 
+#
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 
 # libffi testsuite that uses the 'dg.exp' driver.
 
@@ -23,7 +23,10 @@
 
 global srcdir subdir
 
-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.\[cS\]]] "" "" 
+dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.\[cS\]]] "-O0 -W -Wall" ""
+dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.\[cS\]]] "-O2" ""
+dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.\[cS\]]] "-O3" ""
+dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.\[cS\]]] "-Os" ""
 
 dg-finish
 
Index: testsuite/libffi.call/ffitest.h
===================================================================
--- testsuite/libffi.call/ffitest.h	(revision 111581)
+++ testsuite/libffi.call/ffitest.h	(working copy)
@@ -20,6 +20,14 @@
 #endif
 #endif
 
+/* Define __UNUSED__ that also other compilers than gcc can run the tests.  */
+#undef __UNUSED__
+#if defined(__GNUC__)
+#define __UNUSED__ __attribute__((__unused__))
+#else
+#define __UNUSED__
+#endif
+
 /* Prefer MAP_ANON(YMOUS) to /dev/zero, since we don't need to keep a
    file open.  */
 #ifdef HAVE_MMAP_ANON
Index: testsuite/libffi.call/cls_12byte.c
===================================================================
--- testsuite/libffi.call/cls_12byte.c	(revision 111581)
+++ testsuite/libffi.call/cls_12byte.c	(working copy)
@@ -28,7 +28,8 @@
   return result;
 }
 
-static void cls_struct_12byte_gn(ffi_cif* cif, void* resp, void** args, void* userdata)
+static void cls_struct_12byte_gn(ffi_cif* cif __UNUSED__, void* resp,
+				 void** args , void* userdata __UNUSED__)
 {
   struct cls_struct_12byte b1, b2;
 
Index: testsuite/libffi.call/cls_16byte.c
===================================================================
--- testsuite/libffi.call/cls_16byte.c	(revision 111581)
+++ testsuite/libffi.call/cls_16byte.c	(working copy)
@@ -29,7 +29,8 @@
   return result;
 }
 
-static void cls_struct_16byte_gn(ffi_cif* cif, void* resp, void** args, void* userdata)
+static void cls_struct_16byte_gn(ffi_cif* cif __UNUSED__, void* resp,
+				 void** args, void* userdata __UNUSED__)
 {
   struct cls_struct_16byte b1, b2;
 
Index: testsuite/libffi.call/cls_18byte.c
===================================================================
--- testsuite/libffi.call/cls_18byte.c	(revision 111581)
+++ testsuite/libffi.call/cls_18byte.c	(working copy)
@@ -33,7 +33,8 @@
 }
 
 static void
-cls_struct_18byte_gn(ffi_cif* cif, void* resp, void** args, void* userdata)
+cls_struct_18byte_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
+		     void* userdata __UNUSED__)
 {
   struct cls_struct_18byte a1, a2;
 
Index: testsuite/libffi.call/cls_19byte.c
===================================================================
--- testsuite/libffi.call/cls_19byte.c	(revision 111581)
+++ testsuite/libffi.call/cls_19byte.c	(working copy)
@@ -36,7 +36,8 @@
 }
 
 static void
-cls_struct_19byte_gn(ffi_cif* cif, void* resp, void** args, void* userdata)
+cls_struct_19byte_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
+		     void* userdata __UNUSED__)
 {
   struct cls_struct_19byte a1, a2;
 
Index: testsuite/libffi.call/cls_1_1byte.c
===================================================================
--- testsuite/libffi.call/cls_1_1byte.c	(revision 111581)
+++ testsuite/libffi.call/cls_1_1byte.c	(working copy)
@@ -26,7 +26,8 @@
 }
 
 static void
-cls_struct_1_1byte_gn(ffi_cif* cif, void* resp, void** args, void* userdata)
+cls_struct_1_1byte_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
+		      void* userdata __UNUSED__)
 {
 
   struct cls_struct_1_1byte a1, a2;
Index: testsuite/libffi.call/cls_20byte.c
===================================================================
--- testsuite/libffi.call/cls_20byte.c	(revision 111581)
+++ testsuite/libffi.call/cls_20byte.c	(working copy)
@@ -29,7 +29,8 @@
 }
 
 static void
-cls_struct_20byte_gn(ffi_cif* cif, void* resp, void** args, void* userdata)
+cls_struct_20byte_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
+		     void* userdata __UNUSED__)
 {
   struct cls_struct_20byte a1, a2;
 
Index: testsuite/libffi.call/cls_20byte1.c
===================================================================
--- testsuite/libffi.call/cls_20byte1.c	(revision 111581)
+++ testsuite/libffi.call/cls_20byte1.c	(working copy)
@@ -29,7 +29,8 @@
 }
 
 static void
-cls_struct_20byte_gn(ffi_cif* cif, void* resp, void** args, void* userdata)
+cls_struct_20byte_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
+		     void* userdata __UNUSED__)
 {
   struct cls_struct_20byte a1, a2;
 
Index: testsuite/libffi.call/cls_24byte.c
===================================================================
--- testsuite/libffi.call/cls_24byte.c	(revision 111581)
+++ testsuite/libffi.call/cls_24byte.c	(working copy)
@@ -38,7 +38,8 @@
 }
 
 static void
-cls_struct_24byte_gn(ffi_cif* cif, void* resp, void** args, void* userdata)
+cls_struct_24byte_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
+		     void* userdata __UNUSED__)
 {
   struct cls_struct_24byte b0, b1, b2, b3;
 
Index: testsuite/libffi.call/cls_2byte.c
===================================================================
--- testsuite/libffi.call/cls_2byte.c	(revision 111581)
+++ testsuite/libffi.call/cls_2byte.c	(working copy)
@@ -28,7 +28,8 @@
 }
 
 static void
-cls_struct_2byte_gn(ffi_cif* cif, void* resp, void** args, void* userdata)
+cls_struct_2byte_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
+		    void* userdata __UNUSED__)
 {
 
   struct cls_struct_2byte a1, a2;
Index: testsuite/libffi.call/cls_3_1byte.c
===================================================================
--- testsuite/libffi.call/cls_3_1byte.c	(revision 111581)
+++ testsuite/libffi.call/cls_3_1byte.c	(working copy)
@@ -32,7 +32,8 @@
 }
 
 static void
-cls_struct_3_1byte_gn(ffi_cif* cif, void* resp, void** args, void* userdata)
+cls_struct_3_1byte_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
+		      void* userdata __UNUSED__)
 {
 
   struct cls_struct_3_1byte a1, a2;
Index: testsuite/libffi.call/cls_3byte1.c
===================================================================
--- testsuite/libffi.call/cls_3byte1.c	(revision 111581)
+++ testsuite/libffi.call/cls_3byte1.c	(working copy)
@@ -28,7 +28,8 @@
 }
 
 static void
-cls_struct_3byte_gn(ffi_cif* cif, void* resp, void** args, void* userdata)
+cls_struct_3byte_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
+		    void* userdata __UNUSED__)
 {
 
   struct cls_struct_3byte a1, a2;
Index: testsuite/libffi.call/cls_3byte2.c
===================================================================
--- testsuite/libffi.call/cls_3byte2.c	(revision 111581)
+++ testsuite/libffi.call/cls_3byte2.c	(working copy)
@@ -28,7 +28,8 @@
 }
 
 static void
-cls_struct_3byte_gn1(ffi_cif* cif, void* resp, void** args, void* userdata)
+cls_struct_3byte_gn1(ffi_cif* cif __UNUSED__, void* resp, void** args,
+		     void* userdata __UNUSED__)
 {
 
   struct cls_struct_3byte_1 a1, a2;
Index: testsuite/libffi.call/cls_4_1byte.c
===================================================================
--- testsuite/libffi.call/cls_4_1byte.c	(revision 111581)
+++ testsuite/libffi.call/cls_4_1byte.c	(working copy)
@@ -34,7 +34,8 @@
 }
 
 static void
-cls_struct_4_1byte_gn(ffi_cif* cif, void* resp, void** args, void* userdata)
+cls_struct_4_1byte_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
+		      void* userdata __UNUSED__)
 {
 
   struct cls_struct_4_1byte a1, a2;
Index: testsuite/libffi.call/cls_4byte.c
===================================================================
--- testsuite/libffi.call/cls_4byte.c	(revision 111581)
+++ testsuite/libffi.call/cls_4byte.c	(working copy)
@@ -28,7 +28,8 @@
 }
 
 static void
-cls_struct_4byte_gn(ffi_cif* cif, void* resp, void** args, void* userdata)
+cls_struct_4byte_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
+		    void* userdata __UNUSED__)
 {
 
   struct cls_struct_4byte a1, a2;
Index: testsuite/libffi.call/cls_5_1_byte.c
===================================================================
--- testsuite/libffi.call/cls_5_1_byte.c	(revision 111581)
+++ testsuite/libffi.call/cls_5_1_byte.c	(working copy)
@@ -36,7 +36,8 @@
 }
 
 static void
-cls_struct_5byte_gn(ffi_cif* cif, void* resp, void** args, void* userdata)
+cls_struct_5byte_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
+		    void* userdata __UNUSED__)
 {
 
   struct cls_struct_5byte a1, a2;
Index: testsuite/libffi.call/cls_5byte.c
===================================================================
--- testsuite/libffi.call/cls_5byte.c	(revision 111581)
+++ testsuite/libffi.call/cls_5byte.c	(working copy)
@@ -31,7 +31,8 @@
 }
 
 static void
-cls_struct_5byte_gn(ffi_cif* cif, void* resp, void** args, void* userdata)
+cls_struct_5byte_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
+		    void* userdata __UNUSED__)
 {
 
   struct cls_struct_5byte a1, a2;
Index: testsuite/libffi.call/cls_64byte.c
===================================================================
--- testsuite/libffi.call/cls_64byte.c	(revision 111581)
+++ testsuite/libffi.call/cls_64byte.c	(working copy)
@@ -43,7 +43,8 @@
 }
 
 static void
-cls_struct_64byte_gn(ffi_cif* cif, void* resp, void** args, void* userdata)
+cls_struct_64byte_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
+		     void* userdata __UNUSED__)
 {
   struct cls_struct_64byte b0, b1, b2, b3;
 
Index: testsuite/libffi.call/cls_6_1_byte.c
===================================================================
--- testsuite/libffi.call/cls_6_1_byte.c	(revision 111581)
+++ testsuite/libffi.call/cls_6_1_byte.c	(working copy)
@@ -38,7 +38,8 @@
 }
 
 static void
-cls_struct_6byte_gn(ffi_cif* cif, void* resp, void** args, void* userdata)
+cls_struct_6byte_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
+		    void* userdata __UNUSED__)
 {
 
   struct cls_struct_6byte a1, a2;
Index: testsuite/libffi.call/cls_6byte.c
===================================================================
--- testsuite/libffi.call/cls_6byte.c	(revision 111581)
+++ testsuite/libffi.call/cls_6byte.c	(working copy)
@@ -33,7 +33,8 @@
 }
 
 static void
-cls_struct_6byte_gn(ffi_cif* cif, void* resp, void** args, void* userdata)
+cls_struct_6byte_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
+		    void* userdata __UNUSED__)
 {
 
   struct cls_struct_6byte a1, a2;
Index: testsuite/libffi.call/cls_7_1_byte.c
===================================================================
--- testsuite/libffi.call/cls_7_1_byte.c	(revision 111581)
+++ testsuite/libffi.call/cls_7_1_byte.c	(working copy)
@@ -40,7 +40,8 @@
 }
 
 static void
-cls_struct_7byte_gn(ffi_cif* cif, void* resp, void** args, void* userdata)
+cls_struct_7byte_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
+		    void* userdata __UNUSED__)
 {
 
   struct cls_struct_7byte a1, a2;
Index: testsuite/libffi.call/cls_7byte.c
===================================================================
--- testsuite/libffi.call/cls_7byte.c	(revision 111581)
+++ testsuite/libffi.call/cls_7byte.c	(working copy)
@@ -33,7 +33,8 @@
 }
 
 static void
-cls_struct_7byte_gn(ffi_cif* cif, void* resp, void** args, void* userdata)
+cls_struct_7byte_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
+		    void* userdata __UNUSED__)
 {
 
   struct cls_struct_7byte a1, a2;
Index: testsuite/libffi.call/cls_8byte.c
===================================================================
--- testsuite/libffi.call/cls_8byte.c	(revision 111581)
+++ testsuite/libffi.call/cls_8byte.c	(working copy)
@@ -27,7 +27,8 @@
 }
 
 static void
-cls_struct_8byte_gn(ffi_cif* cif, void* resp, void** args, void* userdata)
+cls_struct_8byte_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
+		    void* userdata __UNUSED__)
 {
 
   struct cls_struct_8byte a1, a2;
Index: testsuite/libffi.call/cls_9byte1.c
===================================================================
--- testsuite/libffi.call/cls_9byte1.c	(revision 111581)
+++ testsuite/libffi.call/cls_9byte1.c	(working copy)
@@ -29,8 +29,8 @@
   return result;
 }
 
-static void cls_struct_9byte_gn(ffi_cif* cif, void* resp, void** args,
-				void* userdata)
+static void cls_struct_9byte_gn(ffi_cif* cif __UNUSED__, void* resp,
+				void** args, void* userdata __UNUSED__)
 {
   struct cls_struct_9byte b1, b2;
 
Index: testsuite/libffi.call/cls_9byte2.c
===================================================================
--- testsuite/libffi.call/cls_9byte2.c	(revision 111581)
+++ testsuite/libffi.call/cls_9byte2.c	(working copy)
@@ -29,8 +29,8 @@
   return result;
 }
 
-static void cls_struct_9byte_gn(ffi_cif* cif, void* resp, void** args,
-				void* userdata)
+static void cls_struct_9byte_gn(ffi_cif* cif __UNUSED__, void* resp,
+				void** args, void* userdata __UNUSED__)
 {
   struct cls_struct_9byte b1, b2;
 
Index: testsuite/libffi.call/cls_align_double.c
===================================================================
--- testsuite/libffi.call/cls_align_double.c	(revision 111581)
+++ testsuite/libffi.call/cls_align_double.c	(working copy)
@@ -28,7 +28,8 @@
 }
 
 static void
-cls_struct_align_gn(ffi_cif* cif, void* resp, void** args, void* userdata)
+cls_struct_align_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
+		    void* userdata __UNUSED__)
 {
 
   struct cls_struct_align a1, a2;
Index: testsuite/libffi.call/cls_align_float.c
===================================================================
--- testsuite/libffi.call/cls_align_float.c	(revision 111581)
+++ testsuite/libffi.call/cls_align_float.c	(working copy)
@@ -28,7 +28,8 @@
 }
 
 static void
-cls_struct_align_gn(ffi_cif* cif, void* resp, void** args, void* userdata)
+cls_struct_align_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
+		    void* userdata __UNUSED__)
 {
 
   struct cls_struct_align a1, a2;
Index: testsuite/libffi.call/cls_align_longdouble.c
===================================================================
--- testsuite/libffi.call/cls_align_longdouble.c	(revision 111581)
+++ testsuite/libffi.call/cls_align_longdouble.c	(working copy)
@@ -29,7 +29,8 @@
 }
 
 static void
-cls_struct_align_gn(ffi_cif* cif, void* resp, void** args, void* userdata)
+cls_struct_align_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
+		    void* userdata __UNUSED__)
 {
 
   struct cls_struct_align a1, a2;
Index: testsuite/libffi.call/cls_align_pointer.c
===================================================================
--- testsuite/libffi.call/cls_align_pointer.c	(revision 111581)
+++ testsuite/libffi.call/cls_align_pointer.c	(working copy)
@@ -19,16 +19,19 @@
   struct cls_struct_align result;
 
   result.a = a1.a + a2.a;
-  result.b = (void *)((size_t)a1.b + (size_t)a2.b);
+  result.b = (void *)((unsigned long)a1.b + (unsigned long)a2.b);
   result.c = a1.c + a2.c;
 
-  printf("%d %d %d %d %d %d: %d %d %d\n", a1.a, (size_t)a1.b, a1.c, a2.a, (size_t)a2.b, a2.c, result.a, (size_t)result.b, result.c);
+  printf("%d %lu %d %d %lu %d: %d %lu %d\n", a1.a, (unsigned long)a1.b, a1.c,
+	 a2.a, (unsigned long)a2.b, a2.c, result.a, (unsigned long)result.b,
+	 result.c);
 
-  return  result;
+  return result;
 }
 
 static void
-cls_struct_align_gn(ffi_cif* cif, void* resp, void** args, void* userdata)
+cls_struct_align_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
+		    void* userdata __UNUSED__)
 {
 
   struct cls_struct_align a1, a2;
@@ -84,14 +87,14 @@
 
   ffi_call(&cif, FFI_FN(cls_struct_align_fn), &res_dbl, args_dbl);
   /* { dg-output "12 4951 127 1 9320 13: 13 14271 140" } */
-  printf("res: %d %d %d\n", res_dbl.a, (size_t)res_dbl.b, res_dbl.c);
+  printf("res: %d %lu %d\n", res_dbl.a, (unsigned long)res_dbl.b, res_dbl.c);
   /* { dg-output "\nres: 13 14271 140" } */
 
   CHECK(ffi_prep_closure(pcl, &cif, cls_struct_align_gn, NULL) == FFI_OK);
 
   res_dbl = ((cls_struct_align(*)(cls_struct_align, cls_struct_align))(pcl))(g_dbl, f_dbl);
   /* { dg-output "\n12 4951 127 1 9320 13: 13 14271 140" } */
-  printf("res: %d %d %d\n", res_dbl.a, (size_t)res_dbl.b, res_dbl.c);
+  printf("res: %d %lu %d\n", res_dbl.a, (unsigned long)res_dbl.b, res_dbl.c);
   /* { dg-output "\nres: 13 14271 140" } */
 
   exit(0);
Index: testsuite/libffi.call/cls_align_sint16.c
===================================================================
--- testsuite/libffi.call/cls_align_sint16.c	(revision 111581)
+++ testsuite/libffi.call/cls_align_sint16.c	(working copy)
@@ -28,7 +28,8 @@
 }
 
 static void
-cls_struct_align_gn(ffi_cif* cif, void* resp, void** args, void* userdata)
+cls_struct_align_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
+		    void* userdata __UNUSED__)
 {
 
   struct cls_struct_align a1, a2;
Index: testsuite/libffi.call/cls_align_sint32.c
===================================================================
--- testsuite/libffi.call/cls_align_sint32.c	(revision 111581)
+++ testsuite/libffi.call/cls_align_sint32.c	(working copy)
@@ -28,7 +28,8 @@
 }
 
 static void
-cls_struct_align_gn(ffi_cif* cif, void* resp, void** args, void* userdata)
+cls_struct_align_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
+		    void* userdata __UNUSED__)
 {
 
   struct cls_struct_align a1, a2;
Index: testsuite/libffi.call/cls_align_sint64.c
===================================================================
--- testsuite/libffi.call/cls_align_sint64.c	(revision 111581)
+++ testsuite/libffi.call/cls_align_sint64.c	(working copy)
@@ -28,7 +28,8 @@
 }
 
 static void
-cls_struct_align_gn(ffi_cif* cif, void* resp, void** args, void* userdata)
+cls_struct_align_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
+		    void* userdata __UNUSED__)
 {
 
   struct cls_struct_align a1, a2;
Index: testsuite/libffi.call/cls_align_uint16.c
===================================================================
--- testsuite/libffi.call/cls_align_uint16.c	(revision 111581)
+++ testsuite/libffi.call/cls_align_uint16.c	(working copy)
@@ -28,7 +28,8 @@
 }
 
 static void
-cls_struct_align_gn(ffi_cif* cif, void* resp, void** args, void* userdata)
+cls_struct_align_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
+		    void* userdata __UNUSED__)
 {
 
   struct cls_struct_align a1, a2;
Index: testsuite/libffi.call/cls_align_uint32.c
===================================================================
--- testsuite/libffi.call/cls_align_uint32.c	(revision 111581)
+++ testsuite/libffi.call/cls_align_uint32.c	(working copy)
@@ -28,7 +28,8 @@
 }
 
 static void
-cls_struct_align_gn(ffi_cif* cif, void* resp, void** args, void* userdata)
+cls_struct_align_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
+		    void* userdata __UNUSED__)
 {
 
   struct cls_struct_align a1, a2;
Index: testsuite/libffi.call/cls_double.c
===================================================================
--- testsuite/libffi.call/cls_double.c	(revision 111581)
+++ testsuite/libffi.call/cls_double.c	(working copy)
@@ -7,8 +7,8 @@
 /* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
 #include "ffitest.h"
 
-static void cls_ret_double_fn(ffi_cif* cif,void* resp,void** args,
-			     void* userdata)
+static void cls_ret_double_fn(ffi_cif* cif __UNUSED__, void* resp, void** args,
+			      void* userdata __UNUSED__)
  {
    *(double *)resp = *(double *)args[0];
 
Index: testsuite/libffi.call/cls_float.c
===================================================================
--- testsuite/libffi.call/cls_float.c	(revision 111581)
+++ testsuite/libffi.call/cls_float.c	(working copy)
@@ -7,8 +7,8 @@
 /* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
 #include "ffitest.h"
 
-static void cls_ret_float_fn(ffi_cif* cif,void* resp,void** args,
-			     void* userdata)
+static void cls_ret_float_fn(ffi_cif* cif __UNUSED__, void* resp, void** args,
+			     void* userdata __UNUSED__)
  {
    *(float *)resp = *(float *)args[0];
 
Index: testsuite/libffi.call/cls_multi_schar.c
===================================================================
--- testsuite/libffi.call/cls_multi_schar.c	(revision 111581)
+++ testsuite/libffi.call/cls_multi_schar.c	(working copy)
@@ -19,7 +19,8 @@
 
 }
 
-static void test_func_gn(ffi_cif *cif, void *rval, void **avals, void *data)
+static void test_func_gn(ffi_cif *cif __UNUSED__, void *rval, void **avals,
+			 void *data __UNUSED__)
 {
   signed char a1, a2;
 
@@ -67,7 +68,7 @@
 
   ffi_call(&cif, FFI_FN(test_func_fn), &res_call, args_dbl);
   /* { dg-output "2 125: 127" } */
-  printf("res: %d\n", res_call);
+  printf("res: %d\n", (signed char)res_call);
   /* { dg-output "\nres: 127" } */
 
   CHECK(ffi_prep_closure(pcl, &cif, test_func_gn, NULL)  == FFI_OK);
Index: testsuite/libffi.call/cls_multi_sshort.c
===================================================================
--- testsuite/libffi.call/cls_multi_sshort.c	(revision 111581)
+++ testsuite/libffi.call/cls_multi_sshort.c	(working copy)
@@ -19,7 +19,8 @@
 
 }
 
-static void test_func_gn(ffi_cif *cif, void *rval, void **avals, void *data)
+static void test_func_gn(ffi_cif *cif __UNUSED__, void *rval, void **avals,
+			 void *data __UNUSED__)
 {
   signed short a1, a2;
 
@@ -67,7 +68,7 @@
 
   ffi_call(&cif, FFI_FN(test_func_fn), &res_call, args_dbl);
   /* { dg-output "2 32765: 32767" } */
-  printf("res: %d\n", res_call);
+  printf("res: %d\n", (unsigned short)res_call);
   /* { dg-output "\nres: 32767" } */
 
   CHECK(ffi_prep_closure(pcl, &cif, test_func_gn, NULL)  == FFI_OK);
Index: testsuite/libffi.call/cls_multi_sshortchar.c
===================================================================
--- testsuite/libffi.call/cls_multi_sshortchar.c	(revision 111581)
+++ testsuite/libffi.call/cls_multi_sshortchar.c	(working copy)
@@ -20,7 +20,8 @@
 
 }
 
-static void test_func_gn(ffi_cif *cif, void *rval, void **avals, void *data)
+static void test_func_gn(ffi_cif *cif __UNUSED__, void *rval, void **avals,
+			 void *data __UNUSED__)
 {
   signed char a1, a3;
   signed short a2, a4;
@@ -79,7 +80,7 @@
 
   ffi_call(&cif, FFI_FN(test_func_fn), &res_call, args_dbl);
   /* { dg-output "1 32765 127 -128: 32765" } */
-  printf("res: %d\n", res_call);
+  printf("res: %d\n", (signed short)res_call);
   /* { dg-output "\nres: 32765" } */
 
   CHECK(ffi_prep_closure(pcl, &cif, test_func_gn, NULL)  == FFI_OK);
Index: testsuite/libffi.call/cls_multi_uchar.c
===================================================================
--- testsuite/libffi.call/cls_multi_uchar.c	(revision 111581)
+++ testsuite/libffi.call/cls_multi_uchar.c	(working copy)
@@ -20,7 +20,8 @@
 
 }
 
-static void test_func_gn(ffi_cif *cif, void *rval, void **avals, void *data)
+static void test_func_gn(ffi_cif *cif __UNUSED__, void *rval, void **avals,
+			 void *data __UNUSED__)
 {
   unsigned char a1, a2, a3, a4;
 
@@ -35,7 +36,9 @@
 
 typedef unsigned char (*test_type)(unsigned char, unsigned char,
 				   unsigned char, unsigned char);
-void test_func(ffi_cif *cif, void *rval, void **avals, void *data)
+
+void test_func(ffi_cif *cif __UNUSED__, void *rval __UNUSED__, void **avals,
+	       void *data __UNUSED__)
 {
   printf("%d %d %d %d\n", *(unsigned char *)avals[0],
 	 *(unsigned char *)avals[1], *(unsigned char *)avals[2],
@@ -82,7 +85,7 @@
 
   ffi_call(&cif, FFI_FN(test_func_fn), &res_call, args_dbl);
   /* { dg-output "1 2 127 125: 255" } */
-  printf("res: %d\n", res_call);
+  printf("res: %d\n", (unsigned char)res_call);
   /* { dg-output "\nres: 255" } */
 
   CHECK(ffi_prep_closure(pcl, &cif, test_func_gn, NULL)  == FFI_OK);
Index: testsuite/libffi.call/cls_multi_ushort.c
===================================================================
--- testsuite/libffi.call/cls_multi_ushort.c	(revision 111581)
+++ testsuite/libffi.call/cls_multi_ushort.c	(working copy)
@@ -19,7 +19,8 @@
 
 }
 
-static void test_func_gn(ffi_cif *cif, void *rval, void **avals, void *data)
+static void test_func_gn(ffi_cif *cif __UNUSED__, void *rval, void **avals,
+			 void *data __UNUSED__)
 {
   unsigned short a1, a2;
 
@@ -67,7 +68,7 @@
 
   ffi_call(&cif, FFI_FN(test_func_fn), &res_call, args_dbl);
   /* { dg-output "2 32765: 32767" } */
-  printf("res: %d\n", res_call);
+  printf("res: %d\n", (unsigned short)res_call);
   /* { dg-output "\nres: 32767" } */
 
   CHECK(ffi_prep_closure(pcl, &cif, test_func_gn, NULL)  == FFI_OK);
Index: testsuite/libffi.call/cls_multi_ushortchar.c
===================================================================
--- testsuite/libffi.call/cls_multi_ushortchar.c	(revision 111581)
+++ testsuite/libffi.call/cls_multi_ushortchar.c	(working copy)
@@ -20,7 +20,8 @@
 
 }
 
-static void test_func_gn(ffi_cif *cif, void *rval, void **avals, void *data)
+static void test_func_gn(ffi_cif *cif __UNUSED__, void *rval, void **avals,
+			 void *data __UNUSED__)
 {
   unsigned char a1, a3;
   unsigned short a2, a4;
@@ -79,7 +80,7 @@
 
   ffi_call(&cif, FFI_FN(test_func_fn), &res_call, args_dbl);
   /* { dg-output "1 2 127 128: 258" } */
-  printf("res: %d\n", res_call);
+  printf("res: %d\n", (unsigned short)res_call);
   /* { dg-output "\nres: 258" } */
 
   CHECK(ffi_prep_closure(pcl, &cif, test_func_gn, NULL)  == FFI_OK);
Index: testsuite/libffi.call/cls_schar.c
===================================================================
--- testsuite/libffi.call/cls_schar.c	(revision 111581)
+++ testsuite/libffi.call/cls_schar.c	(working copy)
@@ -7,12 +7,12 @@
 /* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
 #include "ffitest.h"
 
-static void cls_ret_schar_fn(ffi_cif* cif,void* resp,void** args,
-			     void* userdata)
+static void cls_ret_schar_fn(ffi_cif* cif __UNUSED__, void* resp, void** args,
+			     void* userdata __UNUSED__)
 {
   *(ffi_arg*)resp = *(signed char *)args[0];
   printf("%d: %d\n",*(signed char *)args[0],
-	 *(ffi_arg*)resp);
+	 (int)*(ffi_arg *)(resp));
 }
 typedef signed char (*cls_ret_schar)(signed char);
 
Index: testsuite/libffi.call/cls_sint.c
===================================================================
--- testsuite/libffi.call/cls_sint.c	(revision 111581)
+++ testsuite/libffi.call/cls_sint.c	(working copy)
@@ -7,12 +7,12 @@
 /* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
 #include "ffitest.h"
 
-static void cls_ret_sint_fn(ffi_cif* cif,void* resp,void** args,
-			     void* userdata)
+static void cls_ret_sint_fn(ffi_cif* cif __UNUSED__, void* resp, void** args,
+			    void* userdata __UNUSED__)
 {
   *(ffi_arg*)resp = *(signed int *)args[0];
   printf("%d: %d\n",*(signed int *)args[0],
-	 *(ffi_arg*)resp);
+	 (int)*(ffi_arg *)(resp));
 }
 typedef signed int (*cls_ret_sint)(signed int);
 
Index: testsuite/libffi.call/cls_sshort.c
===================================================================
--- testsuite/libffi.call/cls_sshort.c	(revision 111581)
+++ testsuite/libffi.call/cls_sshort.c	(working copy)
@@ -7,12 +7,12 @@
 /* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
 #include "ffitest.h"
 
-static void cls_ret_sshort_fn(ffi_cif* cif,void* resp,void** args,
-			     void* userdata)
+static void cls_ret_sshort_fn(ffi_cif* cif __UNUSED__, void* resp, void** args,
+			      void* userdata __UNUSED__)
 {
   *(ffi_arg*)resp = *(signed short *)args[0];
   printf("%d: %d\n",*(signed short *)args[0],
-	 *(ffi_arg*)resp);
+	 (int)*(ffi_arg *)(resp));
 }
 typedef signed short (*cls_ret_sshort)(signed short);
 
Index: testsuite/libffi.call/cls_uchar.c
===================================================================
--- testsuite/libffi.call/cls_uchar.c	(revision 111581)
+++ testsuite/libffi.call/cls_uchar.c	(working copy)
@@ -7,12 +7,12 @@
 /* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
 #include "ffitest.h"
 
-static void cls_ret_uchar_fn(ffi_cif* cif,void* resp,void** args,
-			     void* userdata)
+static void cls_ret_uchar_fn(ffi_cif* cif __UNUSED__, void* resp, void** args,
+			     void* userdata __UNUSED__)
 {
   *(ffi_arg*)resp = *(unsigned char *)args[0];
   printf("%d: %d\n",*(unsigned char *)args[0],
-	 *(ffi_arg*)resp);
+	 (int)*(ffi_arg *)(resp));
 }
 typedef unsigned char (*cls_ret_uchar)(unsigned char);
 
Index: testsuite/libffi.call/cls_uint.c
===================================================================
--- testsuite/libffi.call/cls_uint.c	(revision 111581)
+++ testsuite/libffi.call/cls_uint.c	(working copy)
@@ -7,14 +7,14 @@
 /* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
 #include "ffitest.h"
 
-static void cls_ret_uint_fn(ffi_cif* cif,void* resp,void** args,
-			     void* userdata)
- {
-   *(ffi_arg *)resp = *(unsigned int *)args[0];
+static void cls_ret_uint_fn(ffi_cif* cif __UNUSED__, void* resp, void** args,
+			    void* userdata __UNUSED__)
+{
+  *(ffi_arg *)resp = *(unsigned int *)args[0];
 
-   printf("%d: %d\n",*(unsigned int *)args[0],
-	  *(ffi_arg *)resp);
- }
+  printf("%d: %d\n",*(unsigned int *)args[0],
+	 (int)*(ffi_arg *)(resp));
+}
 typedef unsigned int (*cls_ret_uint)(unsigned int);
 
 int main (void)
Index: testsuite/libffi.call/cls_ulonglong.c
===================================================================
--- testsuite/libffi.call/cls_ulonglong.c	(revision 111581)
+++ testsuite/libffi.call/cls_ulonglong.c	(working copy)
@@ -7,14 +7,14 @@
 /* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
 #include "ffitest.h"
 
-static void cls_ret_ulonglong_fn(ffi_cif* cif,void* resp,void** args,
-			     void* userdata)
- {
-   *(unsigned long long *)resp=  *(unsigned long long *)args[0];
+static void cls_ret_ulonglong_fn(ffi_cif* cif __UNUSED__, void* resp,
+				 void** args, void* userdata __UNUSED__)
+{
+  *(unsigned long long *)resp=  *(unsigned long long *)args[0];
 
-   printf("%llu: %llu\n",*(unsigned long long *)args[0],
-	  *(unsigned long long *)resp);
- }
+  printf("%llu: %llu\n",*(unsigned long long *)args[0],
+	 *(unsigned long long *)(resp));
+}
 typedef unsigned long long (*cls_ret_ulonglong)(unsigned long long);
 
 int main (void)
Index: testsuite/libffi.call/cls_ushort.c
===================================================================
--- testsuite/libffi.call/cls_ushort.c	(revision 111581)
+++ testsuite/libffi.call/cls_ushort.c	(working copy)
@@ -7,14 +7,14 @@
 /* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
 #include "ffitest.h"
 
-static void cls_ret_ushort_fn(ffi_cif* cif,void* resp,void** args,
-			     void* userdata)
- {
-   *(ffi_arg*)resp = *(unsigned short *)args[0];
+static void cls_ret_ushort_fn(ffi_cif* cif __UNUSED__, void* resp, void** args,
+			      void* userdata __UNUSED__)
+{
+  *(ffi_arg*)resp = *(unsigned short *)args[0];
 
-   printf("%d: %d\n",*(unsigned short *)args[0],
-	  *(ffi_arg*)resp);
- }
+  printf("%d: %d\n",*(unsigned short *)args[0],
+	 (int)*(ffi_arg *)(resp));
+}
 typedef unsigned short (*cls_ret_ushort)(unsigned short);
 
 int main (void)
Index: testsuite/libffi.call/float.c
===================================================================
--- testsuite/libffi.call/float.c	(revision 111581)
+++ testsuite/libffi.call/float.c	(working copy)
@@ -8,7 +8,7 @@
 
 #include "ffitest.h"
 
-static int floating(int a, float b, double c, long double d, int e)
+static int floating(int a, float b, double c, long double d)
 {
   int i;
 
@@ -28,7 +28,6 @@
   signed int si1;
   double d;
   long double ld;
-  signed int si2;
 
   args[0] = &ffi_type_sint;
   values[0] = &si1;
@@ -38,26 +37,23 @@
   values[2] = &d;
   args[3] = &ffi_type_longdouble;
   values[3] = &ld;
-  args[4] = &ffi_type_sint;
-  values[4] = &si2;
 
   /* Initialize the cif */
-  CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 5,
+  CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 4,
 		     &ffi_type_sint, args) == FFI_OK);
 
   si1 = 6;
   f = 3.14159;
   d = (double)1.0/(double)3.0;
   ld = 2.71828182846L;
-  si2 = 10;
 
-  floating (si1, f, d, ld, si2);
+  floating (si1, f, d, ld);
 
   ffi_call(&cif, FFI_FN(floating), &rint, values);
 
-  printf ("%d vs %d\n", (int)rint, floating (si1, f, d, ld, si2));
+  printf ("%d vs %d\n", (int)rint, floating (si1, f, d, ld));
 
-  CHECK(rint == floating(si1, f, d, ld, si2));
+  CHECK((int)rint == floating(si1, f, d, ld));
 
   exit (0);
 }
Index: testsuite/libffi.call/float1.c
===================================================================
--- testsuite/libffi.call/float1.c	(revision 111581)
+++ testsuite/libffi.call/float1.c	(working copy)
@@ -28,25 +28,25 @@
   void *values[MAX_ARGS];
   float f;
   value_type result[2];
-  int i;
+  unsigned int i;
 
   args[0] = &ffi_type_float;
   values[0] = &f;
-  
+
   /* Initialize the cif */
-  CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 1, 
+  CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 1,
 		     &ffi_type_double, args) == FFI_OK);
-  
+
   f = 3.14159;
-  
+
   /* Put a canary in the return array.  This is a regression test for
      a buffer overrun.  */
   memset(result[1].c, CANARY, sizeof (double));
 
   ffi_call(&cif, FFI_FN(dblit), &result[0].d, values);
-  
+
   /* These are not always the same!! Check for a reasonable delta */
- 
+
   CHECK(result[0].d - dblit(f) < DBL_EPSILON);
 
   /* Check the canary.  */
Index: testsuite/libffi.call/negint.c
===================================================================
--- testsuite/libffi.call/negint.c	(revision 111581)
+++ testsuite/libffi.call/negint.c	(working copy)
@@ -11,7 +11,6 @@
 
 static int checking(int a, short b, signed char c)
 {
-  int i;
 
   return (a < 0 && b < 0 && c < 0);
 }
Index: testsuite/libffi.call/nested_struct.c
===================================================================
--- testsuite/libffi.call/nested_struct.c	(revision 111581)
+++ testsuite/libffi.call/nested_struct.c	(working copy)
@@ -50,7 +50,8 @@
 }
 
 static void
-cls_struct_combined_gn(ffi_cif* cif, void* resp, void** args, void* userdata)
+cls_struct_combined_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
+		       void* userdata __UNUSED__)
 {
   struct cls_struct_16byte1 b0;
   struct cls_struct_16byte2 b1;
Index: testsuite/libffi.call/nested_struct1.c
===================================================================
--- testsuite/libffi.call/nested_struct1.c	(revision 111581)
+++ testsuite/libffi.call/nested_struct1.c	(working copy)
@@ -52,7 +52,8 @@
 }
 
 static void
-cls_struct_combined_gn(ffi_cif* cif, void* resp, void** args, void* userdata)
+cls_struct_combined_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
+		       void* userdata __UNUSED__)
 {
   struct cls_struct_16byte1 b0;
   struct cls_struct_16byte2 b1;
Index: testsuite/libffi.call/nested_struct10.c
===================================================================
--- testsuite/libffi.call/nested_struct10.c	(revision 111581)
+++ testsuite/libffi.call/nested_struct10.c	(working copy)
@@ -41,8 +41,8 @@
 }
 
 static void
-B_gn(ffi_cif* cif __attribute__((unused)), void* resp, void** args,
-     void* userdata __attribute__((unused)))
+B_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
+     void* userdata __UNUSED__)
 {
   struct A b0;
   struct B b1;
Index: testsuite/libffi.call/nested_struct2.c
===================================================================
--- testsuite/libffi.call/nested_struct2.c	(revision 111581)
+++ testsuite/libffi.call/nested_struct2.c	(working copy)
@@ -27,14 +27,15 @@
   result.x.b = b0.b + b1.x.b + b1.y;
   result.y = b0.b + b1.x.b;
 
-  printf("%d %d %d %d %d: %d %d %d\n", b0.a, b0.b, b1.x.a, b1.x.b, b1.y,
+  printf("%lu %d %lu %d %d: %lu %d %d\n", b0.a, b0.b, b1.x.a, b1.x.b, b1.y,
 	 result.x.a, result.x.b, result.y);
 
   return result;
 }
 
 static void
-B_gn(ffi_cif* cif, void* resp, void** args, void* userdata)
+B_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
+     void* userdata __UNUSED__)
 {
   struct A b0;
   struct B b1;
Index: testsuite/libffi.call/nested_struct3.c
===================================================================
--- testsuite/libffi.call/nested_struct3.c	(revision 111581)
+++ testsuite/libffi.call/nested_struct3.c	(working copy)
@@ -35,7 +35,8 @@
 }
 
 static void
-B_gn(ffi_cif* cif, void* resp, void** args, void* userdata)
+B_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
+     void* userdata __UNUSED__)
 {
   struct A b0;
   struct B b1;
Index: testsuite/libffi.call/nested_struct4.c
===================================================================
--- testsuite/libffi.call/nested_struct4.c	(revision 111581)
+++ testsuite/libffi.call/nested_struct4.c	(working copy)
@@ -3,7 +3,7 @@
 		Contains structs as parameter of the struct itself.
 		Sample taken from Alan Modras patch to src/prep_cif.c.
    Limitations:	none.
-   PR:		none.
+   PR:		PR 25630.
    Originator:	<andreast@gcc.gnu.org> 20051010	 */
 
 /* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* powerpc*-*-darwin* } } */
@@ -35,8 +35,8 @@
 }
 
 static void
-B_gn(ffi_cif* cif __attribute__((unused)), void* resp, void** args,
-     void* userdata __attribute__((unused)))
+B_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
+     void* userdata __UNUSED__)
 {
   struct A b0;
   struct B b1;
Index: testsuite/libffi.call/nested_struct5.c
===================================================================
--- testsuite/libffi.call/nested_struct5.c	(revision 111581)
+++ testsuite/libffi.call/nested_struct5.c	(working copy)
@@ -35,8 +35,8 @@
 }
 
 static void
-B_gn(ffi_cif* cif __attribute__((unused)), void* resp, void** args,
-     void* userdata __attribute__((unused)))
+B_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
+     void* userdata __UNUSED__)
 {
   struct A b0;
   struct B b1;
Index: testsuite/libffi.call/nested_struct6.c
===================================================================
--- testsuite/libffi.call/nested_struct6.c	(revision 111581)
+++ testsuite/libffi.call/nested_struct6.c	(working copy)
@@ -3,7 +3,7 @@
 		Contains structs as parameter of the struct itself.
 		Sample taken from Alan Modras patch to src/prep_cif.c.
    Limitations:	none.
-   PR:		none.
+   PR:		PR 25630.
    Originator:	<andreast@gcc.gnu.org> 20051010	 */
 
 /* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* powerpc*-*-darwin* } } */
@@ -40,8 +40,8 @@
 }
 
 static void
-B_gn(ffi_cif* cif __attribute__((unused)), void* resp, void** args,
-     void* userdata __attribute__((unused)))
+B_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
+     void* userdata __UNUSED__)
 {
   struct A b0;
   struct B b1;
Index: testsuite/libffi.call/nested_struct7.c
===================================================================
--- testsuite/libffi.call/nested_struct7.c	(revision 111581)
+++ testsuite/libffi.call/nested_struct7.c	(working copy)
@@ -35,8 +35,8 @@
 }
 
 static void
-B_gn(ffi_cif* cif __attribute__((unused)), void* resp, void** args,
-     void* userdata __attribute__((unused)))
+B_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
+     void* userdata __UNUSED__)
 {
   struct A b0;
   struct B b1;
Index: testsuite/libffi.call/nested_struct8.c
===================================================================
--- testsuite/libffi.call/nested_struct8.c	(revision 111581)
+++ testsuite/libffi.call/nested_struct8.c	(working copy)
@@ -40,8 +40,8 @@
 }
 
 static void
-B_gn(ffi_cif* cif __attribute__((unused)), void* resp, void** args,
-     void* userdata __attribute__((unused)))
+B_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
+     void* userdata __UNUSED__)
 {
   struct A b0;
   struct B b1;
Index: testsuite/libffi.call/nested_struct9.c
===================================================================
--- testsuite/libffi.call/nested_struct9.c	(revision 111581)
+++ testsuite/libffi.call/nested_struct9.c	(working copy)
@@ -40,8 +40,8 @@
 }
 
 static void
-B_gn(ffi_cif* cif __attribute__((unused)), void* resp, void** args,
-     void* userdata __attribute__((unused)))
+B_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
+     void* userdata __UNUSED__)
 {
   struct A b0;
   struct B b1;
Index: testsuite/libffi.call/problem1.c
===================================================================
--- testsuite/libffi.call/problem1.c	(revision 111581)
+++ testsuite/libffi.call/problem1.c	(working copy)
@@ -27,7 +27,8 @@
   return result;
 }
 
-void stub(ffi_cif* cif, void* resp, void** args, void* userdata)
+void stub(ffi_cif* cif __UNUSED__, void* resp, void** args,
+	  void* userdata __UNUSED__)
 {
   struct my_ffi_struct a1;
   struct my_ffi_struct a2;
Index: testsuite/libffi.call/pyobjc-tc.c
===================================================================
--- testsuite/libffi.call/pyobjc-tc.c	(revision 111581)
+++ testsuite/libffi.call/pyobjc-tc.c	(working copy)
@@ -107,7 +107,7 @@
 
 	ffi_call(&cif, FFI_FN(doit), &result, values);
 
-	printf ("The result is %d\n", result);
+	printf ("The result is %d\n", (int)result);
 
 	}
 	exit(0);
Index: testsuite/libffi.call/return_fl2.c
===================================================================
--- testsuite/libffi.call/return_fl2.c	(revision 111581)
+++ testsuite/libffi.call/return_fl2.c	(working copy)
@@ -7,6 +7,9 @@
 /* { dg-do run } */
 #include "ffitest.h"
 
+/* To avoid a false negative on ix86 do not declare the return_fl static.
+   See PR323.
+*/
 float return_fl(float fl1, float fl2, float fl3, float fl4)
 {
   return fl1 + fl2 + fl3 + fl4;
Index: testsuite/libffi.call/closure_fn0.c
===================================================================
--- testsuite/libffi.call/closure_fn0.c	(revision 111581)
+++ 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 __UNUSED__, void* resp, void** args,
+		 void* userdata)
 {
   *(ffi_arg*)resp =
     (int)*(unsigned long long *)args[0] + (int)(*(int *)args[1]) +
Index: testsuite/libffi.call/closure_fn1.c
===================================================================
--- testsuite/libffi.call/closure_fn1.c	(revision 111581)
+++ testsuite/libffi.call/closure_fn1.c	(working copy)
@@ -10,7 +10,7 @@
 #include "ffitest.h"
 
 
-static void closure_test_fn1(ffi_cif* cif,void* resp,void** args,
+static void closure_test_fn1(ffi_cif* cif __UNUSED__, void* resp, void** args,
 			     void* userdata)
 {
   *(ffi_arg*)resp =
Index: testsuite/libffi.call/closure_fn2.c
===================================================================
--- testsuite/libffi.call/closure_fn2.c	(revision 111581)
+++ testsuite/libffi.call/closure_fn2.c	(working copy)
@@ -9,7 +9,7 @@
 /* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
 #include "ffitest.h"
 
-static void closure_test_fn2(ffi_cif* cif,void* resp,void** args,
+static void closure_test_fn2(ffi_cif* cif __UNUSED__, void* resp, void** args,
 			     void* userdata)
 {
   *(ffi_arg*)resp =
Index: testsuite/libffi.call/closure_fn3.c
===================================================================
--- testsuite/libffi.call/closure_fn3.c	(revision 111581)
+++ testsuite/libffi.call/closure_fn3.c	(working copy)
@@ -9,7 +9,7 @@
 /* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
 #include "ffitest.h"
 
-static void closure_test_fn3(ffi_cif* cif,void* resp,void** args,
+static void closure_test_fn3(ffi_cif* cif __UNUSED__, void* resp, void** args,
 			     void* userdata)
  {
    *(ffi_arg*)resp =
Index: testsuite/libffi.call/closure_fn4.c
===================================================================
--- testsuite/libffi.call/closure_fn4.c	(revision 111581)
+++ testsuite/libffi.call/closure_fn4.c	(working copy)
@@ -11,7 +11,8 @@
 #include "ffitest.h"
 
 static void
-closure_test_fn0(ffi_cif* cif,void* resp,void** args, void* userdata)
+closure_test_fn0(ffi_cif* cif __UNUSED__, void* resp, void** args,
+		 void* userdata)
 {
   *(ffi_arg*)resp =
     (int)*(unsigned long long *)args[0] + (int)*(unsigned long long *)args[1] +
Index: testsuite/libffi.call/closure_fn5.c
===================================================================
--- testsuite/libffi.call/closure_fn5.c	(revision 111581)
+++ testsuite/libffi.call/closure_fn5.c	(working copy)
@@ -7,11 +7,11 @@
    Originator:	<andreast@gcc.gnu.org> 20031026	 */
 
 /* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
-
 #include "ffitest.h"
 
 static void
-closure_test_fn5(ffi_cif* cif,void* resp,void** args, void* userdata)
+closure_test_fn5(ffi_cif* cif __UNUSED__, void* resp, void** args,
+		 void* userdata)
 {
   *(ffi_arg*)resp =
     (int)*(unsigned long long *)args[0] + (int)*(unsigned long long *)args[1] +
Index: testsuite/libffi.call/closure_fn6.c
===================================================================
--- testsuite/libffi.call/closure_fn6.c	(revision 111581)
+++ testsuite/libffi.call/closure_fn6.c	(working copy)
@@ -9,7 +9,8 @@
 #include "ffitest.h"
 
 static void
-closure_test_fn0(ffi_cif* cif,void* resp,void** args, void* userdata)
+closure_test_fn0(ffi_cif* cif __UNUSED__, void* resp, void** args,
+		 void* userdata)
 {
   *(ffi_arg*)resp =
     (int)*(unsigned long long *)args[0] +

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