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]

[RFT] libffi testsuite cleanup warnings


Hello all,

even if I am the libffi testsuite maintainer I'd like to ask for test, comments. I do mistakes like other do.

I will add a -W -Wall to the testsuite and I have quite a few warnings that I have had to cleanup.

I tested the attached patch on darwin-ppc, linux-pcc, sparc64-freebsd and sun-sparc-solaris8 (32 and 64-bit)

I appreciate any comments.

If no comments come in, I'll commit the patch within 2 days (on monday, the 27th of feb)

Thanks,
Andreas

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

	* testsuite/libffi.call/closure_fn0.c: Clean up warnings discovered by
	-W -Wall.
	* testsuite/libffi.call/closure_fn1.c: Likewise.
	* testsuite/libffi.call/closure_fn2.c: Likewise.
	* testsuite/libffi.call/closure_fn3.c: Likewise.
	* testsuite/libffi.call/closure_fn4.c: Likewise.
	* testsuite/libffi.call/closure_fn5.c: Likewise.
	* testsuite/libffi.call/closure_fn6.c: Likewise.
	* testsuite/libffi.call/cls_12byte.c: Likewise.
	* testsuite/libffi.call/cls_16byte.c: Likewise.
	* testsuite/libffi.call/cls_18byte.c: Likewise.
	* testsuite/libffi.call/cls_19byte.c: Likewise.
	* testsuite/libffi.call/cls_1_1byte.c: Likewise.
	* testsuite/libffi.call/cls_20byte.c: Likewise.
	* testsuite/libffi.call/cls_20byte1.c: Likewise.
	* testsuite/libffi.call/cls_24byte.c: Likewise.
	* testsuite/libffi.call/cls_2byte.c: Likewise.
	* testsuite/libffi.call/cls_3_1byte.c: Likewise.
	* testsuite/libffi.call/cls_3byte1.c: Likewise.
	* testsuite/libffi.call/cls_3byte2.c: Likewise.
	* testsuite/libffi.call/cls_4_1byte.c: Likewise.
	* testsuite/libffi.call/cls_4byte.c: Likewise.
	* testsuite/libffi.call/cls_5_1_byte.c: Likewise.
	* testsuite/libffi.call/cls_5byte.c: Likewise.
	* testsuite/libffi.call/cls_64byte.c: Likewise.
	* testsuite/libffi.call/cls_6_1_byte.c: Likewise.
	* testsuite/libffi.call/cls_6byte.c: Likewise.
	* testsuite/libffi.call/cls_7_1_byte.c: Likewise.
	* testsuite/libffi.call/cls_7byte.c: Likewise.
	* testsuite/libffi.call/cls_8byte.c: Likewise.
	* testsuite/libffi.call/cls_9byte1.c: Likewise.
	* testsuite/libffi.call/cls_9byte2.c: Likewise.
	* testsuite/libffi.call/cls_align_double.c: Likewise.
	* testsuite/libffi.call/cls_align_float.c: Likewise.
	* testsuite/libffi.call/cls_align_longdouble.c: Likewise.
	* testsuite/libffi.call/cls_align_pointer.c: Likewise.
	* testsuite/libffi.call/cls_align_sint16.c: Likewise.
	* testsuite/libffi.call/cls_align_sint32.c: Likewise.
	* testsuite/libffi.call/cls_align_sint64.c: Likewise.
	* testsuite/libffi.call/cls_align_uint16.c: Likewise.
	* testsuite/libffi.call/cls_align_uint32.c: Likewise.
	* testsuite/libffi.call/cls_align_uint64.c: Likewise.
	* testsuite/libffi.call/cls_double.c: Likewise.
	* testsuite/libffi.call/cls_float.c: Likewise.
	* testsuite/libffi.call/cls_multi_schar.c: Likewise.
	* testsuite/libffi.call/cls_multi_sshort.c: Likewise.
	* testsuite/libffi.call/cls_multi_sshortchar.c: Likewise.
	* testsuite/libffi.call/cls_multi_uchar.c: Likewise.
	* testsuite/libffi.call/cls_multi_ushort.c: Likewise.
	* testsuite/libffi.call/cls_multi_ushortchar.c: Likewise.
	* testsuite/libffi.call/cls_schar.c: Likewise.
	* testsuite/libffi.call/cls_sint.c: Likewise.
	* testsuite/libffi.call/cls_sshort.c: Likewise.
	* testsuite/libffi.call/cls_uchar.c: Likewise.
	* testsuite/libffi.call/cls_uint.c: Likewise.
	* testsuite/libffi.call/cls_ulonglong.c: Likewise.
	* testsuite/libffi.call/cls_ushort.c: Likewise.
	* testsuite/libffi.call/float.c: Likewise.
	* testsuite/libffi.call/float1.c: Likewise.
	* testsuite/libffi.call/negint.c: Likewise.
	* testsuite/libffi.call/nested_struct.c: Likewise.
	* testsuite/libffi.call/nested_struct1.c: Likewise.
	* testsuite/libffi.call/nested_struct2.c: Likewise.
	* testsuite/libffi.call/nested_struct3.c: Likewise.
	* testsuite/libffi.call/nested_struct4.c: Likewise.
	* testsuite/libffi.call/nested_struct6.c: Likewise.
	* testsuite/libffi.call/problem1.c: Likewise.
	* testsuite/libffi.call/pyobjc-tc.c: Likewise.
	* testsuite/libffi.call/return_fl2.c: Likewise.
	* testsuite/libffi.special/unwindtest.cc: Likewise.
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]) +
Index: testsuite/libffi.call/closure_fn1.c
===================================================================
--- testsuite/libffi.call/closure_fn1.c	(revision 111437)
+++ testsuite/libffi.call/closure_fn1.c	(working copy)
@@ -10,8 +10,8 @@
 #include "ffitest.h"
 
 
-static void closure_test_fn1(ffi_cif* cif,void* resp,void** args,
-			     void* userdata)
+static void closure_test_fn1(ffi_cif* cif __attribute__ ((unused)), void* resp,
+			     void** args, void* userdata)
 {
   *(ffi_arg*)resp =
     (int)*(float *)args[0] +(int)(*(float *)args[1]) +
Index: testsuite/libffi.call/closure_fn2.c
===================================================================
--- testsuite/libffi.call/closure_fn2.c	(revision 111437)
+++ testsuite/libffi.call/closure_fn2.c	(working copy)
@@ -9,8 +9,8 @@
 /* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
 #include "ffitest.h"
 
-static void closure_test_fn2(ffi_cif* cif,void* resp,void** args,
-			     void* userdata)
+static void closure_test_fn2(ffi_cif* cif __attribute__ ((unused)), void* resp,
+			     void** args, void* userdata)
 {
   *(ffi_arg*)resp =
     (int)*(double *)args[0] +(int)(*(double *)args[1]) +
Index: testsuite/libffi.call/closure_fn3.c
===================================================================
--- testsuite/libffi.call/closure_fn3.c	(revision 111437)
+++ testsuite/libffi.call/closure_fn3.c	(working copy)
@@ -9,8 +9,8 @@
 /* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
 #include "ffitest.h"
 
-static void closure_test_fn3(ffi_cif* cif,void* resp,void** args,
-			     void* userdata)
+static void closure_test_fn3(ffi_cif* cif __attribute__ ((unused)), void* resp,
+			     void** args, void* userdata)
  {
    *(ffi_arg*)resp =
      (int)*(float *)args[0] +(int)(*(float *)args[1]) +
Index: testsuite/libffi.call/closure_fn4.c
===================================================================
--- testsuite/libffi.call/closure_fn4.c	(revision 111437)
+++ testsuite/libffi.call/closure_fn4.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_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)*(unsigned long long *)args[1] +
Index: testsuite/libffi.call/closure_fn5.c
===================================================================
--- testsuite/libffi.call/closure_fn5.c	(revision 111437)
+++ 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 __attribute__ ((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 111437)
+++ 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 __attribute__ ((unused)), void* resp, void** args,
+		 void* userdata)
 {
   *(ffi_arg*)resp =
     (int)*(unsigned long long *)args[0] +
Index: testsuite/libffi.call/cls_12byte.c
===================================================================
--- testsuite/libffi.call/cls_12byte.c	(revision 111437)
+++ testsuite/libffi.call/cls_12byte.c	(working copy)
@@ -28,7 +28,9 @@
   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 __attribute__ ((unused)),
+				 void* resp, void** args ,
+				 void* userdata __attribute__ ((unused)))
 {
   struct cls_struct_12byte b1, b2;
 
Index: testsuite/libffi.call/cls_16byte.c
===================================================================
--- testsuite/libffi.call/cls_16byte.c	(revision 111437)
+++ testsuite/libffi.call/cls_16byte.c	(working copy)
@@ -29,7 +29,9 @@
   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 __attribute__ ((unused)),
+				 void* resp, void** args,
+				 void* userdata __attribute__ ((unused)))
 {
   struct cls_struct_16byte b1, b2;
 
Index: testsuite/libffi.call/cls_18byte.c
===================================================================
--- testsuite/libffi.call/cls_18byte.c	(revision 111437)
+++ 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 __attribute__ ((unused)), void* resp,
+		     void** args, void* userdata __attribute__ ((unused)))
 {
   struct cls_struct_18byte a1, a2;
 
Index: testsuite/libffi.call/cls_19byte.c
===================================================================
--- testsuite/libffi.call/cls_19byte.c	(revision 111437)
+++ 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 __attribute__ ((unused)), void* resp,
+		     void** args, void* userdata __attribute__ ((unused)))
 {
   struct cls_struct_19byte a1, a2;
 
Index: testsuite/libffi.call/cls_1_1byte.c
===================================================================
--- testsuite/libffi.call/cls_1_1byte.c	(revision 111437)
+++ 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 __attribute__ ((unused)), void* resp,
+		      void** args, void* userdata __attribute__ ((unused)))
 {
 
   struct cls_struct_1_1byte a1, a2;
Index: testsuite/libffi.call/cls_20byte.c
===================================================================
--- testsuite/libffi.call/cls_20byte.c	(revision 111437)
+++ 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 __attribute__ ((unused)), void* resp,
+		     void** args, void* userdata __attribute__ ((unused)))
 {
   struct cls_struct_20byte a1, a2;
 
Index: testsuite/libffi.call/cls_20byte1.c
===================================================================
--- testsuite/libffi.call/cls_20byte1.c	(revision 111437)
+++ 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 __attribute__ ((unused)), void* resp,
+		     void** args, void* userdata __attribute__ ((unused)))
 {
   struct cls_struct_20byte a1, a2;
 
Index: testsuite/libffi.call/cls_24byte.c
===================================================================
--- testsuite/libffi.call/cls_24byte.c	(revision 111437)
+++ 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 __attribute__ ((unused)), void* resp,
+		     void** args, void* userdata __attribute__ ((unused)))
 {
   struct cls_struct_24byte b0, b1, b2, b3;
 
Index: testsuite/libffi.call/cls_2byte.c
===================================================================
--- testsuite/libffi.call/cls_2byte.c	(revision 111437)
+++ 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 __attribute__ ((unused)), void* resp,
+		    void** args, void* userdata __attribute__ ((unused)))
 {
 
   struct cls_struct_2byte a1, a2;
Index: testsuite/libffi.call/cls_3_1byte.c
===================================================================
--- testsuite/libffi.call/cls_3_1byte.c	(revision 111437)
+++ 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 __attribute__ ((unused)), void* resp,
+		      void** args, void* userdata __attribute__ ((unused)))
 {
 
   struct cls_struct_3_1byte a1, a2;
Index: testsuite/libffi.call/cls_3byte1.c
===================================================================
--- testsuite/libffi.call/cls_3byte1.c	(revision 111437)
+++ 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 __attribute__ ((unused)), void* resp,
+		    void** args, void* userdata __attribute__ ((unused)))
 {
 
   struct cls_struct_3byte a1, a2;
Index: testsuite/libffi.call/cls_3byte2.c
===================================================================
--- testsuite/libffi.call/cls_3byte2.c	(revision 111437)
+++ 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 __attribute__ ((unused)), void* resp,
+		     void** args, void* userdata __attribute__ ((unused)))
 {
 
   struct cls_struct_3byte_1 a1, a2;
Index: testsuite/libffi.call/cls_4_1byte.c
===================================================================
--- testsuite/libffi.call/cls_4_1byte.c	(revision 111437)
+++ 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 __attribute__ ((unused)), void* resp,
+		      void** args, void* userdata __attribute__ ((unused)))
 {
 
   struct cls_struct_4_1byte a1, a2;
Index: testsuite/libffi.call/cls_4byte.c
===================================================================
--- testsuite/libffi.call/cls_4byte.c	(revision 111437)
+++ testsuite/libffi.call/cls_4byte.c	(working copy)
@@ -6,7 +6,6 @@
    Originator:	<andreast@gcc.gnu.org> 20030828	 */
 
 /* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
-
 #include "ffitest.h"
 
 typedef struct cls_struct_4byte {
@@ -28,7 +27,8 @@
 }
 
 static void
-cls_struct_4byte_gn(ffi_cif* cif, void* resp, void** args, void* userdata)
+cls_struct_4byte_gn(ffi_cif* cif __attribute__ ((unused)), void* resp,
+		    void** args, void* userdata __attribute__ ((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 111437)
+++ 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 __attribute__ ((unused)), void* resp,
+		    void** args, void* userdata __attribute__ ((unused)))
 {
 
   struct cls_struct_5byte a1, a2;
Index: testsuite/libffi.call/cls_5byte.c
===================================================================
--- testsuite/libffi.call/cls_5byte.c	(revision 111437)
+++ 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 __attribute__ ((unused)), void* resp,
+		    void** args, void* userdata __attribute__ ((unused)))
 {
 
   struct cls_struct_5byte a1, a2;
Index: testsuite/libffi.call/cls_64byte.c
===================================================================
--- testsuite/libffi.call/cls_64byte.c	(revision 111437)
+++ 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 __attribute__ ((unused)), void* resp,
+		     void** args, void* userdata __attribute__ ((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 111437)
+++ 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 __attribute__ ((unused)), void* resp,
+		    void** args, void* userdata __attribute__ ((unused)))
 {
 
   struct cls_struct_6byte a1, a2;
Index: testsuite/libffi.call/cls_6byte.c
===================================================================
--- testsuite/libffi.call/cls_6byte.c	(revision 111437)
+++ 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 __attribute__ ((unused)), void* resp,
+		    void** args, void* userdata __attribute__ ((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 111437)
+++ 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 __attribute__ ((unused)), void* resp,
+		    void** args, void* userdata __attribute__ ((unused)))
 {
 
   struct cls_struct_7byte a1, a2;
Index: testsuite/libffi.call/cls_7byte.c
===================================================================
--- testsuite/libffi.call/cls_7byte.c	(revision 111437)
+++ 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 __attribute__ ((unused)), void* resp,
+		    void** args, void* userdata __attribute__ ((unused)))
 {
 
   struct cls_struct_7byte a1, a2;
Index: testsuite/libffi.call/cls_8byte.c
===================================================================
--- testsuite/libffi.call/cls_8byte.c	(revision 111437)
+++ 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 __attribute__ ((unused)), void* resp,
+		    void** args, void* userdata __attribute__ ((unused)))
 {
 
   struct cls_struct_8byte a1, a2;
Index: testsuite/libffi.call/cls_9byte1.c
===================================================================
--- testsuite/libffi.call/cls_9byte1.c	(revision 111437)
+++ testsuite/libffi.call/cls_9byte1.c	(working copy)
@@ -29,8 +29,9 @@
   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 __attribute__ ((unused)),
+				void* resp, void** args,
+				void* userdata __attribute__ ((unused)))
 {
   struct cls_struct_9byte b1, b2;
 
Index: testsuite/libffi.call/cls_9byte2.c
===================================================================
--- testsuite/libffi.call/cls_9byte2.c	(revision 111437)
+++ testsuite/libffi.call/cls_9byte2.c	(working copy)
@@ -29,8 +29,9 @@
   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 __attribute__ ((unused)),
+				void* resp, void** args,
+				void* userdata __attribute__ ((unused)))
 {
   struct cls_struct_9byte b1, b2;
 
Index: testsuite/libffi.call/cls_align_double.c
===================================================================
--- testsuite/libffi.call/cls_align_double.c	(revision 111437)
+++ 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 __attribute__ ((unused)), void* resp,
+		    void** args, void* userdata __attribute__ ((unused)))
 {
 
   struct cls_struct_align a1, a2;
Index: testsuite/libffi.call/cls_align_float.c
===================================================================
--- testsuite/libffi.call/cls_align_float.c	(revision 111437)
+++ 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 __attribute__ ((unused)), void* resp,
+		    void** args, void* userdata __attribute__ ((unused)))
 {
 
   struct cls_struct_align a1, a2;
Index: testsuite/libffi.call/cls_align_longdouble.c
===================================================================
--- testsuite/libffi.call/cls_align_longdouble.c	(revision 111437)
+++ 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 __attribute__ ((unused)), void* resp,
+		    void** args, void* userdata __attribute__ ((unused)))
 {
 
   struct cls_struct_align a1, a2;
Index: testsuite/libffi.call/cls_align_pointer.c
===================================================================
--- testsuite/libffi.call/cls_align_pointer.c	(revision 111437)
+++ 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 __attribute__ ((unused)), void* resp,
+		    void** args, void* userdata __attribute__ ((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 111437)
+++ 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 __attribute__ ((unused)), void* resp,
+		    void** args, void* userdata __attribute__ ((unused)))
 {
 
   struct cls_struct_align a1, a2;
Index: testsuite/libffi.call/cls_align_sint32.c
===================================================================
--- testsuite/libffi.call/cls_align_sint32.c	(revision 111437)
+++ 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 __attribute__ ((unused)), void* resp,
+		    void** args, void* userdata __attribute__ ((unused)))
 {
 
   struct cls_struct_align a1, a2;
Index: testsuite/libffi.call/cls_align_sint64.c
===================================================================
--- testsuite/libffi.call/cls_align_sint64.c	(revision 111437)
+++ 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 __attribute__ ((unused)), void* resp,
+		    void** args, void* userdata __attribute__ ((unused)))
 {
 
   struct cls_struct_align a1, a2;
Index: testsuite/libffi.call/cls_align_uint16.c
===================================================================
--- testsuite/libffi.call/cls_align_uint16.c	(revision 111437)
+++ 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 __attribute__ ((unused)), void* resp,
+		    void** args, void* userdata __attribute__ ((unused)))
 {
 
   struct cls_struct_align a1, a2;
Index: testsuite/libffi.call/cls_align_uint32.c
===================================================================
--- testsuite/libffi.call/cls_align_uint32.c	(revision 111437)
+++ 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 __attribute__ ((unused)), void* resp,
+		    void** args, void* userdata __attribute__ ((unused)))
 {
 
   struct cls_struct_align a1, a2;
Index: testsuite/libffi.call/cls_align_uint64.c
===================================================================
--- testsuite/libffi.call/cls_align_uint64.c	(revision 111437)
+++ testsuite/libffi.call/cls_align_uint64.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 __attribute__ ((unused)), void* resp,
+		    void** args, void* userdata __attribute__ ((unused)))
 {
 
   struct cls_struct_align a1, a2;
Index: testsuite/libffi.call/cls_double.c
===================================================================
--- testsuite/libffi.call/cls_double.c	(revision 111437)
+++ testsuite/libffi.call/cls_double.c	(working copy)
@@ -7,8 +7,9 @@
 /* { 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 __attribute__ ((unused)), void* resp,
+			      void** args,
+			      void* userdata __attribute__ ((unused)))
  {
    *(double *)resp = *(double *)args[0];
 
Index: testsuite/libffi.call/cls_float.c
===================================================================
--- testsuite/libffi.call/cls_float.c	(revision 111437)
+++ testsuite/libffi.call/cls_float.c	(working copy)
@@ -7,8 +7,9 @@
 /* { 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 __attribute__ ((unused)), void* resp,
+			     void** args,
+			     void* userdata __attribute__ ((unused)))
  {
    *(float *)resp = *(float *)args[0];
 
Index: testsuite/libffi.call/cls_multi_schar.c
===================================================================
--- testsuite/libffi.call/cls_multi_schar.c	(revision 111437)
+++ 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 __attribute__ ((unused)), void *rval,
+			 void **avals, void *data __attribute__ ((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 111437)
+++ 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 __attribute__ ((unused)), void *rval,
+			 void **avals, void *data __attribute__ ((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 111437)
+++ 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 __attribute__ ((unused)), void *rval,
+			 void **avals, void *data __attribute__ ((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 111437)
+++ 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 __attribute__ ((unused)), void *rval,
+			 void **avals, void *data __attribute__ ((unused)))
 {
   unsigned char a1, a2, a3, a4;
 
@@ -35,7 +36,10 @@
 
 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 __attribute__ ((unused)),
+	       void *rval __attribute__ ((unused)), void **avals,
+	       void *data __attribute__ ((unused)))
 {
   printf("%d %d %d %d\n", *(unsigned char *)avals[0],
 	 *(unsigned char *)avals[1], *(unsigned char *)avals[2],
@@ -82,7 +86,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 111437)
+++ 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 __attribute__ ((unused)), void *rval,
+			 void **avals, void *data __attribute__ ((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 111437)
+++ 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 __attribute__ ((unused)), void *rval,
+			 void **avals, void *data __attribute__ ((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 111437)
+++ testsuite/libffi.call/cls_schar.c	(working copy)
@@ -7,12 +7,13 @@
 /* { 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 __attribute__ ((unused)), void* resp,
+			     void** args,
+			     void* userdata __attribute__ ((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 111437)
+++ testsuite/libffi.call/cls_sint.c	(working copy)
@@ -7,12 +7,13 @@
 /* { 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 __attribute__ ((unused)), void* resp,
+			    void** args,
+			    void* userdata __attribute__ ((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 111437)
+++ testsuite/libffi.call/cls_sshort.c	(working copy)
@@ -7,12 +7,13 @@
 /* { 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 __attribute__ ((unused)), void* resp,
+			      void** args,
+			      void* userdata __attribute__ ((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 111437)
+++ testsuite/libffi.call/cls_uchar.c	(working copy)
@@ -7,12 +7,13 @@
 /* { 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 __attribute__ ((unused)), void* resp,
+			     void** args,
+			     void* userdata __attribute__ ((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 111437)
+++ testsuite/libffi.call/cls_uint.c	(working copy)
@@ -7,14 +7,15 @@
 /* { 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 __attribute__ ((unused)), void* resp,
+			    void** args,
+			    void* userdata __attribute__ ((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 111437)
+++ testsuite/libffi.call/cls_ulonglong.c	(working copy)
@@ -7,14 +7,15 @@
 /* { 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 __attribute__ ((unused)),
+				 void* resp, void** args,
+				 void* userdata __attribute__ ((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 111437)
+++ testsuite/libffi.call/cls_ushort.c	(working copy)
@@ -7,14 +7,15 @@
 /* { 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 __attribute__ ((unused)), void* resp,
+			      void** args,
+			      void* userdata __attribute__ ((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 111437)
+++ 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 111437)
+++ 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 111437)
+++ 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 111437)
+++ 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 __attribute__ ((unused)), void* resp,
+		       void** args, void* userdata __attribute__ ((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 111437)
+++ 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 __attribute__ ((unused)), void* resp,
+		       void** args, void* userdata __attribute__ ((unused)))
 {
   struct cls_struct_16byte1 b0;
   struct cls_struct_16byte2 b1;
Index: testsuite/libffi.call/nested_struct2.c
===================================================================
--- testsuite/libffi.call/nested_struct2.c	(revision 111437)
+++ 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 __attribute__ ((unused)), void* resp, void** args,
+     void* userdata __attribute__ ((unused)))
 {
   struct A b0;
   struct B b1;
Index: testsuite/libffi.call/nested_struct3.c
===================================================================
--- testsuite/libffi.call/nested_struct3.c	(revision 111437)
+++ 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 __attribute__ ((unused)), void* resp, void** args,
+     void* userdata __attribute__ ((unused)))
 {
   struct A b0;
   struct B b1;
Index: testsuite/libffi.call/nested_struct4.c
===================================================================
--- testsuite/libffi.call/nested_struct4.c	(revision 111437)
+++ 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* } } */
Index: testsuite/libffi.call/nested_struct6.c
===================================================================
--- testsuite/libffi.call/nested_struct6.c	(revision 111437)
+++ 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* } } */
Index: testsuite/libffi.call/problem1.c
===================================================================
--- testsuite/libffi.call/problem1.c	(revision 111437)
+++ 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 __attribute__ ((unused)), void* resp, void** args,
+	  void* userdata __attribute__ ((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 111437)
+++ 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 111437)
+++ 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.special/unwindtest.cc
===================================================================
--- testsuite/libffi.special/unwindtest.cc	(revision 111437)
+++ testsuite/libffi.special/unwindtest.cc	(working copy)
@@ -8,15 +8,19 @@
 #include "ffitestcxx.h"
 
 void
-closure_test_fn(ffi_cif* cif, void* resp, void** args, void* userdata)
+closure_test_fn(ffi_cif* cif __attribute__ ((unused)),
+		void* resp __attribute__ ((unused)),
+		void** args __attribute__ ((unused)),
+		void* userdata __attribute__ ((unused)))
 {
   throw 9;
 }
 
 typedef void (*closure_test_type)();
 
-void closure_test_fn1(ffi_cif* cif,void* resp,void** args,
-			     void* userdata)
+void closure_test_fn1(ffi_cif* cif __attribute__ ((unused)), void* resp,
+		      void** args,
+		      void* userdata __attribute__ ((unused)))
  {
     *(ffi_arg*)resp =
       (int)*(float *)args[0] +(int)(*(float *)args[1]) +
@@ -54,7 +58,6 @@
 #endif
   ffi_closure *pcl;
   ffi_type * cl_arg_types[17];
-  int res;
 #ifdef USING_MMAP
   pcl = (ffi_closure *) allocate_mmap (sizeof(ffi_closure));
 #else

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