summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorAnthony Green <green@moxielogic.com>2021-06-28 18:45:11 -0400
committerAnthony Green <green@moxielogic.com>2021-06-28 18:45:11 -0400
commit1ed0aa73806872f0c31dccf2c689c762239d3353 (patch)
tree7183afac3c6c48bc45a08d9848300eee4ece084d /testsuite
parent0a2cc2ec2893821f62b36b269da1dbc0442a5617 (diff)
downloadlibffi-1ed0aa73806872f0c31dccf2c689c762239d3353.tar.gz
Fix warnings
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/libffi.closures/single_entry_structs1.c6
-rw-r--r--testsuite/libffi.closures/single_entry_structs3.c2
2 files changed, 4 insertions, 4 deletions
diff --git a/testsuite/libffi.closures/single_entry_structs1.c b/testsuite/libffi.closures/single_entry_structs1.c
index 89d0d32..00c4e17 100644
--- a/testsuite/libffi.closures/single_entry_structs1.c
+++ b/testsuite/libffi.closures/single_entry_structs1.c
@@ -38,7 +38,7 @@ int main (void)
ffi_closure *pcl = ffi_closure_alloc(sizeof(ffi_closure), &code);
void* args_dbl[3];
ffi_type* cls_struct_fields[2];
- ffi_type cls_struct_type, cls_struct_type1;
+ ffi_type cls_struct_type;
ffi_type* dbl_arg_types[3];
int e_dbl = 12125;
@@ -71,14 +71,14 @@ int main (void)
ffi_call(&cif, FFI_FN(A_fn), &res_dbl, args_dbl);
- printf("1 res: %d \n", res_dbl.a);
+ printf("1 res: %d\n", res_dbl.a);
/* { dg-output "\n1 res: 43750" } */
CHECK( res_dbl.a == (e_dbl + f_dbl.a));
CHECK(ffi_prep_closure_loc(pcl, &cif, A_gn, NULL, code) == FFI_OK);
res_dbl = ((A(*)(int, A))(code))(e_dbl, f_dbl);
- printf("2 res: %d \n", res_dbl.a);
+ printf("2 res: %d\n", res_dbl.a);
/* { dg-output "\n2 res: 43750" } */
CHECK( res_dbl.a == (e_dbl + f_dbl.a));
diff --git a/testsuite/libffi.closures/single_entry_structs3.c b/testsuite/libffi.closures/single_entry_structs3.c
index eec8d72..4f619cb 100644
--- a/testsuite/libffi.closures/single_entry_structs3.c
+++ b/testsuite/libffi.closures/single_entry_structs3.c
@@ -73,7 +73,7 @@ int main (void)
dbl_arg_types[2] = NULL;
res_dbl = B_fn(e_dbl, f_dbl);
- printf("0 res: %f\n", res_dbl.y.a);
+ printf("0 res: %d\n", res_dbl.y.a);
/* { dg-output "0 res: 43750" } */