summaryrefslogtreecommitdiff
path: root/src/x86
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2018-04-28 04:46:10 -0600
committerAnthony Green <green@moxielogic.com>2018-04-28 06:46:10 -0400
commit4c2206ace07f2fb4bef43cd4bfe952ccb584dcec (patch)
tree2cef032f39cdb1d97325e183c4f93e1fb75b29bb /src/x86
parented3ed4d801a4d417ea304715d4d8ae581a6c6903 (diff)
downloadlibffi-4c2206ace07f2fb4bef43cd4bfe952ccb584dcec.tar.gz
Fix two "return" issues in x86/ffi64.c (#431)
Issue #70 pointed out that at least one compiler didn't like: return ffi_call_efi64(cif, fn, rvalue, avalue); ... where the return type is "void". This patch splits the statement into two. I also noticed that ffi_call_go here seems to do a double call. I suspect a "return" is missing here, so this patch adds it as well.
Diffstat (limited to 'src/x86')
-rw-r--r--src/x86/ffi64.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/x86/ffi64.c b/src/x86/ffi64.c
index 9d7f701..e46974d 100644
--- a/src/x86/ffi64.c
+++ b/src/x86/ffi64.c
@@ -678,7 +678,10 @@ ffi_call (ffi_cif *cif, void (*fn)(void), void *rvalue, void **avalue)
{
#ifndef __ILP32__
if (cif->abi == FFI_EFI64)
- return ffi_call_efi64(cif, fn, rvalue, avalue);
+ {
+ ffi_call_efi64(cif, fn, rvalue, avalue);
+ return;
+ }
#endif
ffi_call_int (cif, fn, rvalue, avalue, NULL);
}
@@ -695,7 +698,10 @@ ffi_call_go (ffi_cif *cif, void (*fn)(void), void *rvalue,
{
#ifndef __ILP32__
if (cif->abi == FFI_EFI64)
- ffi_call_go_efi64(cif, fn, rvalue, avalue, closure);
+ {
+ ffi_call_go_efi64(cif, fn, rvalue, avalue, closure);
+ return;
+ }
#endif
ffi_call_int (cif, fn, rvalue, avalue, closure);
}