]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
- Issue #22176: Fix build failure on ARM with -Werror=declaration-after-statement
authordoko@ubuntu.com <doko@ubuntu.com>
Sat, 9 Aug 2014 22:01:04 +0000 (00:01 +0200)
committerdoko@ubuntu.com <doko@ubuntu.com>
Sat, 9 Aug 2014 22:01:04 +0000 (00:01 +0200)
Modules/_ctypes/libffi.diff
Modules/_ctypes/libffi/src/arm/ffi.c

index 9db80d3691104e88e68b8da4eabcb5e09d9922c1..ffa7bafe0e097ae2113a4af0265dcc2a5a5a3b25 100644 (file)
@@ -184,3 +184,26 @@ diff -urN libffi-3.1/src/dlmalloc.c libffi/src/dlmalloc.c
      set_lock(m, locked);
    }
    return (mspace)m;
+diff -urN libffi-3.1/src/arm/ffi.c libffi/src/arm/ffi.c
+--- libffi-3.1/src/arm/ffi.c   Sat Aug 09 23:52:34 2014 +0200
++++ libffi/src/arm/ffi.c       Sat Aug 09 23:58:38 2014 +0200
+@@ -154,9 +154,6 @@
+ int ffi_prep_args_VFP(char *stack, extended_cif *ecif, float *vfp_space)
+ {
+-  // make sure we are using FFI_VFP
+-  FFI_ASSERT(ecif->cif->abi == FFI_VFP);
+-
+   register unsigned int i, vi = 0;
+   register void **p_argv;
+   register char *argp, *regp, *eo_regp;
+@@ -165,6 +162,9 @@
+   char done_with_regs = 0;
+   char is_vfp_type;
++  // make sure we are using FFI_VFP
++  FFI_ASSERT(ecif->cif->abi == FFI_VFP);
++
+   /* the first 4 words on the stack are used for values passed in core
+    * registers. */
+   regp = stack;
index 7cd92898fb0abf07a45aa893c54fc737a95afff6..6691ab57daa2190f4b1a697ca59689c258f3cbf9 100644 (file)
@@ -154,9 +154,6 @@ int ffi_prep_args_SYSV(char *stack, extended_cif *ecif, float *vfp_space)
 
 int ffi_prep_args_VFP(char *stack, extended_cif *ecif, float *vfp_space)
 {
-  // make sure we are using FFI_VFP
-  FFI_ASSERT(ecif->cif->abi == FFI_VFP);
-
   register unsigned int i, vi = 0;
   register void **p_argv;
   register char *argp, *regp, *eo_regp;
@@ -165,6 +162,9 @@ int ffi_prep_args_VFP(char *stack, extended_cif *ecif, float *vfp_space)
   char done_with_regs = 0;
   char is_vfp_type;
 
+  // make sure we are using FFI_VFP
+  FFI_ASSERT(ecif->cif->abi == FFI_VFP);
+
   /* the first 4 words on the stack are used for values passed in core
    * registers. */
   regp = stack;