Skip to content

Commit

Permalink
Fix pointer type issue with malloc in gsw_util_intersect
Browse files Browse the repository at this point in the history
  • Loading branch information
mauzey1 committed Sep 23, 2024
1 parent e18e4c3 commit 3999a39
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions gsw_oceanographic_toolbox.c
Original file line number Diff line number Diff line change
Expand Up @@ -12260,10 +12260,10 @@ gsw_util_intersect(double *x, int nx, double *y, int ny, int *ix, int *iy)
return 0;
}

sort_ix = malloc(nx * sizeof(int));
sort_iy = malloc(ny * sizeof(int));
unique_ix = malloc(nx * sizeof(int));
unique_iy = malloc(ny * sizeof(int));
sort_ix = (int *) malloc(nx * sizeof(int));
sort_iy = (int *) malloc(ny * sizeof(int));
unique_ix = (int *) malloc(nx * sizeof(int));
unique_iy = (int *) malloc(ny * sizeof(int));

gsw_util_sort_real(x, nx, sort_ix);
gsw_util_sort_real(y, ny, sort_iy);
Expand Down

0 comments on commit 3999a39

Please sign in to comment.