This is the mail archive of the
libffi-discuss@sourceware.org
mailing list for the libffi project.
[PATCH] libffi: fix duplicate case on powerpc 32 bit
- From: Robert Schwebel <r dot schwebel at pengutronix dot de>
- To: libffi-discuss at sourceware dot org
- Date: Thu, 14 Jun 2012 11:54:46 +0200
- Subject: [PATCH] libffi: fix duplicate case on powerpc 32 bit
Without this fix, gcc complains about a duplicate case value:
../src/powerpc/ffi.c: In function 'ffi_prep_cif_machdep':
../src/powerpc/ffi.c:670:5: error: duplicate case value
../src/powerpc/ffi.c:667:5: error: previously used here
Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
---
src/powerpc/ffi.c | 2 ++
1 file changed, 2 insertions(+)
Index: libffi-3.0.11/src/powerpc/ffi.c
===================================================================
--- libffi-3.0.11.orig/src/powerpc/ffi.c
+++ libffi-3.0.11/src/powerpc/ffi.c
@@ -664,9 +664,11 @@ ffi_prep_cif_machdep (ffi_cif *cif)
switch (type)
{
#ifndef __NO_FPRS__
+#if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE
case FFI_TYPE_LONGDOUBLE:
flags |= FLAG_RETURNS_128BITS;
/* Fall through. */
+#endif
case FFI_TYPE_DOUBLE:
flags |= FLAG_RETURNS_64BITS;
/* Fall through. */
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |