This is the mail archive of the
libffi-discuss@sourceware.org
mailing list for the libffi project.
Re: [patch] fix build error with -Werror=declaration-after-statement
- From: Anthony Green <green at moxielogic dot com>
- To: Matthias Klose <doko at ubuntu dot com>
- Cc: "libffi-discuss\ at sourceware dot org" <libffi-discuss at sourceware dot org>
- Date: Sat, 20 Sep 2014 06:37:33 -0400
- Subject: Re: [patch] fix build error with -Werror=declaration-after-statement
- Authentication-results: sourceware.org; auth=none
- References: <53E76EA8 dot 5000804 at ubuntu dot com>
Matthias Klose <doko@ubuntu.com> writes:
> seen while merging the 3.1 release into the python sources. The build fails when
> built with -Werror=declaration-after-statement
Thanks, Matthias. Committed.
>
> Matthias
>
> 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;