This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
[patch] libffi: remove more lint directives
- From: Andreas Tobler <toa at pop dot agri dot ch>
- To: Java Patches <java-patches at gcc dot gnu dot org>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 14 Aug 2006 23:41:27 +0200
- Subject: [patch] libffi: remove more lint directives
Helo,
I got approval for this kind of patch a few months ago. Can I still
apply or do you prefer to wait for it after branching ?
(Would apply to trunk atm)
Andreas
2006-08-14 Andreas Tobler <a.tobler@schweiz.ch>
* include/ffi_common.h: Remove lint directives.
* include/ffi.h.in: Likewise.
Index: include/ffi.h.in
===================================================================
--- include/ffi.h.in (revision 116016)
+++ include/ffi.h.in (working copy)
@@ -138,7 +138,7 @@
size_t size;
unsigned short alignment;
unsigned short type;
- /*@null@*/ struct _ffi_type **elements;
+ struct _ffi_type **elements;
} ffi_type;
/* These are defined in types.c */
@@ -160,7 +160,7 @@
typedef enum {
FFI_OK = 0,
FFI_BAD_TYPEDEF,
- FFI_BAD_ABI
+ FFI_BAD_ABI
} ffi_status;
typedef unsigned FFI_TYPE;
@@ -168,8 +168,8 @@
typedef struct {
ffi_abi abi;
unsigned nargs;
- /*@dependent@*/ ffi_type **arg_types;
- /*@dependent@*/ ffi_type *rtype;
+ ffi_type **arg_types;
+ ffi_type *rtype;
unsigned bytes;
unsigned flags;
#ifdef FFI_EXTRA_CIF_FIELDS
@@ -195,10 +195,10 @@
void* ptr;
} ffi_raw;
-void ffi_raw_call (/*@dependent@*/ ffi_cif *cif,
- void (*fn)(),
- /*@out@*/ void *rvalue,
- /*@dependent@*/ ffi_raw *avalue);
+void ffi_raw_call (ffi_cif *cif,
+ void (*fn)(),
+ void *rvalue,
+ ffi_raw *avalue);
void ffi_ptrarray_to_raw (ffi_cif *cif, void **args, ffi_raw *raw);
void ffi_raw_to_ptrarray (ffi_cif *cif, ffi_raw *raw, void **args);
@@ -208,10 +208,10 @@
/* packing, even on 64-bit machines. I.e. on 64-bit machines */
/* longs and doubles are followed by an empty 64-bit word. */
-void ffi_java_raw_call (/*@dependent@*/ ffi_cif *cif,
- void (*fn)(),
- /*@out@*/ void *rvalue,
- /*@dependent@*/ ffi_raw *avalue);
+void ffi_java_raw_call (ffi_cif *cif,
+ void (*fn)(),
+ void *rvalue,
+ ffi_raw *avalue);
void ffi_java_ptrarray_to_raw (ffi_cif *cif, void **args, ffi_raw *raw);
void ffi_java_raw_to_ptrarray (ffi_cif *cif, ffi_raw *raw, void **args);
@@ -271,16 +271,16 @@
/* ---- Public interface definition -------------------------------------- */
-ffi_status ffi_prep_cif(/*@out@*/ /*@partial@*/ ffi_cif *cif,
+ffi_status ffi_prep_cif(ffi_cif *cif,
ffi_abi abi,
- unsigned int nargs,
- /*@dependent@*/ /*@out@*/ /*@partial@*/ ffi_type *rtype,
- /*@dependent@*/ ffi_type **atypes);
+ unsigned int nargs,
+ ffi_type *rtype,
+ ffi_type **atypes);
-void ffi_call(/*@dependent@*/ ffi_cif *cif,
- void (*fn)(),
- /*@out@*/ void *rvalue,
- /*@dependent@*/ void **avalue);
+void ffi_call(ffi_cif *cif,
+ void (*fn)(),
+ void *rvalue,
+ void **avalue);
/* Useful for eliminating compiler warnings */
#define FFI_FN(f) ((void (*)())f)
Index: include/ffi_common.h
===================================================================
--- include/ffi_common.h (revision 116016)
+++ include/ffi_common.h (working copy)
@@ -41,20 +41,20 @@
# endif
#endif
-#if defined(FFI_DEBUG)
+#if defined(FFI_DEBUG)
#include <stdio.h>
#endif
#ifdef FFI_DEBUG
-/*@exits@*/ void ffi_assert(/*@temp@*/ char *expr, /*@temp@*/ char *file, int line);
+void ffi_assert(char *expr, char *file, int line);
void ffi_stop_here(void);
-void ffi_type_test(/*@temp@*/ /*@out@*/ ffi_type *a, /*@temp@*/ char *file, int line);
+void ffi_type_test(ffi_type *a, char *file, int line);
#define FFI_ASSERT(x) ((x) ? (void)0 : ffi_assert(#x, __FILE__,__LINE__))
#define FFI_ASSERT_AT(x, f, l) ((x) ? 0 : ffi_assert(#x, (f), (l)))
#define FFI_ASSERT_VALID_TYPE(x) ffi_type_test (x, __FILE__, __LINE__)
#else
-#define FFI_ASSERT(x)
+#define FFI_ASSERT(x)
#define FFI_ASSERT_AT(x, f, l)
#define FFI_ASSERT_VALID_TYPE(x)
#endif
@@ -68,9 +68,9 @@
/* Extended cif, used in callback from assembly routine */
typedef struct
{
- /*@dependent@*/ ffi_cif *cif;
- /*@dependent@*/ void *rvalue;
- /*@dependent@*/ void **avalue;
+ ffi_cif *cif;
+ void *rvalue;
+ void **avalue __attribute__((aligned));
} extended_cif;
/* Terse sized type definitions. */