Clean up code to appease modern GCC compiler.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66
diff --git a/ChangeLog b/ChangeLog
index 3c5854c..6cf0cb1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2013-11-18 Anthony Green <green@moxielogic.com>
+
+ * src/arm/ffi.c (ffi_call): Hoist declaration of temp to top of
+ function.
+ * src/arm/ffi.c (ffi_closure_inner): Moderize function declaration
+ to appease compiler.
+ Thanks for Gregory P. Smith <greg@krypto.org>.
+
+2013-11-18 Anthony Green <green@moxielogic.com>
+
+ * README (tested): Mention PowerPC ELFv2.
+
2013-11-16 Alan Modra <amodra@gmail.com>
* src/powerpc/ppc_closure.S: Move errant #endif to where it belongs.
diff --git a/README b/README
index a20bc1d..938ae63 100644
--- a/README
+++ b/README
@@ -80,7 +80,8 @@ tested:
| PowerPC | Mac OSX | GCC |
| PowerPC | FreeBSD | GCC |
| PowerPC 64-bit | FreeBSD | GCC |
-| PowerPC 64-bit | Linux | GCC |
+| PowerPC 64-bit | Linux ELFv1 | GCC |
+| PowerPC 64-bit | Linux ELFv2 | GCC |
| S390 | Linux | GCC |
| S390X | Linux | GCC |
| SPARC | Linux | GCC |
diff --git a/src/arm/ffi.c b/src/arm/ffi.c
index 09883b1..e452a6e 100644
--- a/src/arm/ffi.c
+++ b/src/arm/ffi.c
@@ -307,11 +307,11 @@ void ffi_call(ffi_cif *cif, void (*fn)(void), void *rvalue, void **avalue)
int vfp_struct = (cif->flags == FFI_TYPE_STRUCT_VFP_FLOAT
|| cif->flags == FFI_TYPE_STRUCT_VFP_DOUBLE);
+ unsigned int temp;
+
ecif.cif = cif;
ecif.avalue = avalue;
- unsigned int temp;
-
/* If the return value is a struct and we don't have a return */
/* value address then we need to make one */
@@ -367,11 +367,8 @@ void ffi_closure_VFP (ffi_closure *);
/* This function is jumped to by the trampoline */
unsigned int
-ffi_closure_inner (closure, respp, args, vfp_args)
- ffi_closure *closure;
- void **respp;
- void *args;
- void *vfp_args;
+ffi_closure_inner (ffi_closure *closure,
+ void **respp, void *args, void *vfp_args)
{
// our various things...
ffi_cif *cif;