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]

[patch] libffi minor


Hi all,

I'd like to apply the appended patch. It offers the use of MAYBE_UNUSED in the whole libffi package not only in the closures.c file.

Ok for trunk?

Thanks,

Andreas

2007-11-24 Andreas Tobler <a.tobler@schweiz.org>

	* src/closures.c: Move defintion of MAYBE_UNUSED from here to ...
	* include/ffi_common.h: ... here.
	Update copyright.

Index: src/closures.c
===================================================================
--- src/closures.c	(revision 130383)
+++ src/closures.c	(working copy)
@@ -1,5 +1,6 @@
 /* -----------------------------------------------------------------------
    closures.c - Copyright (c) 2007  Red Hat, Inc.
+   Copyright (C) 2007 Free Software Foundation, Inc
 
    Code to allocate and deallocate memory for closures.
 
@@ -149,8 +150,6 @@
 
 #endif
 
-#define MAYBE_UNUSED __attribute__((__unused__))
-
 /* Declare all functions defined in dlmalloc.c as static.  */
 static void *dlmalloc(size_t);
 static void dlfree(void*);
Index: include/ffi_common.h
===================================================================
--- include/ffi_common.h	(revision 130383)
+++ include/ffi_common.h	(working copy)
@@ -1,5 +1,6 @@
 /* -----------------------------------------------------------------------
    ffi_common.h - Copyright (c) 1996  Red Hat, Inc.
+   Copyright (C) 2007 Free Software Foundation, Inc
 
    Common internal definitions and macros. Only necessary for building
    libffi.
@@ -18,7 +19,9 @@
    this is positioned. */
 #ifdef __GNUC__
 # define alloca __builtin_alloca
+# define MAYBE_UNUSED __attribute__((__unused__))
 #else
+# define MAYBE_UNUSED
 # if HAVE_ALLOCA_H
 #  include <alloca.h>
 # else

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