Skip to content

Commit

Permalink
Fix warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
atgreen committed Jun 28, 2021
1 parent 0a2cc2e commit 1ed0aa7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions testsuite/libffi.closures/single_entry_structs1.c
Expand Up @@ -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;
Expand Down Expand Up @@ -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));

Expand Down
2 changes: 1 addition & 1 deletion testsuite/libffi.closures/single_entry_structs3.c
Expand Up @@ -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" } */


Expand Down

0 comments on commit 1ed0aa7

Please sign in to comment.