]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
unwindtest.cc (closure_test_fn): Mark cif, args and userdata unused.
authorAndreas Tobler <a.tobler@schweiz.ch>
Tue, 28 Feb 2006 23:18:01 +0000 (00:18 +0100)
committerAndreas Tobler <andreast@gcc.gnu.org>
Tue, 28 Feb 2006 23:18:01 +0000 (00:18 +0100)
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.

From-SVN: r111583

libffi/ChangeLog
libffi/testsuite/libffi.call/cls_align_uint64.c
libffi/testsuite/libffi.special/ffitestcxx.h
libffi/testsuite/libffi.special/special.exp
libffi/testsuite/libffi.special/unwindtest.cc

index ebe638f51f9d11c72303eacf370e6e3d8e3dbae7..f017dacda73312df31006ffb70bec943ef0d561e 100644 (file)
@@ -1,3 +1,10 @@
+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
index 8b7ac6bc30dfdbc3d7d90f7b14ee93101c2642e0..28b3a1596829d0a98620a36e14c8543ebbb67b32 100644 (file)
@@ -28,7 +28,8 @@ cls_struct_align cls_struct_align_fn(struct cls_struct_align a1,
 }
 
 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 01414cc1b0b9952efdf2035549acbc8d116af091..b9f0d48761f3656cb9e8da2e7b3d13ddc76797a2 100644 (file)
@@ -6,6 +6,15 @@
 
 #define MAX_ARGS 256
 
+
+/* 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
+
 #define CHECK(x) (!(x) ? abort() : (void)0)
 
 /* Prefer MAP_ANON(YMOUS) to /dev/zero, since we don't need to keep a
index 5a1c081a4604f415c90d3e94b6ff5f39514d74f0..b7d31dab6c3b7d8e23e285372ffc965242d8bf56 100644 (file)
@@ -1,19 +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, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 # libffi testsuite that uses the 'dg.exp' driver.
 
 load_lib libffi-dg.exp
@@ -27,7 +26,10 @@ global cxx_options
 
 set cxx_options " -shared-libgcc -lstdc++"
 
-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.cc]] $cxx_options ""
+dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.cc]] $cxx_options "-O0 -W -Wall"
+dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.cc]] $cxx_options "-O2"
+dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.cc]] $cxx_options "-O3"
+dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.cc]] $cxx_options "-Os"
 
 dg-finish
 
index bb733c265f33db4442fcf61d12a5b5bd0ae59097..b3f7cb356b7f211483aa078be97ad4fed51a6840 100644 (file)
@@ -8,15 +8,16 @@
 #include "ffitestcxx.h"
 
 void
-closure_test_fn(ffi_cif* cif, void* resp, void** args, void* userdata)
+closure_test_fn(ffi_cif* cif __UNUSED__, void* resp __UNUSED__,
+               void** args __UNUSED__, void* userdata __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 __UNUSED__, void* resp,
+                     void** args, void* userdata __UNUSED__)
  {
     *(ffi_arg*)resp =
       (int)*(float *)args[0] +(int)(*(float *)args[1]) +
@@ -54,7 +55,6 @@ int main (void)
 #endif
   ffi_closure *pcl;
   ffi_type * cl_arg_types[17];
-  int res;
 #ifdef USING_MMAP
   pcl = (ffi_closure *) allocate_mmap (sizeof(ffi_closure));
 #else