vendor/scs/linsys/external/amd/amd_order.c in scs-0.3.1 vs vendor/scs/linsys/external/amd/amd_order.c in scs-0.3.2
- old
+ new
@@ -87,12 +87,12 @@
if (info) Info [AMD_STATUS] = AMD_INVALID ;
return (AMD_INVALID) ; /* matrix is invalid */
}
/* allocate two size-n integer workspaces */
- Len = SuiteSparse_malloc (n, sizeof (Int)) ;
- Pinv = SuiteSparse_malloc (n, sizeof (Int)) ;
+ Len = (Int *)SuiteSparse_malloc (n, sizeof (Int)) ;
+ Pinv = (Int *)SuiteSparse_malloc (n, sizeof (Int)) ;
mem += n ;
mem += n ;
if (!Len || !Pinv)
{
/* :: out of memory :: */
@@ -104,12 +104,12 @@
if (status == AMD_OK_BUT_JUMBLED)
{
/* sort the input matrix and remove duplicate entries */
AMD_DEBUG1 (("Matrix is jumbled\n")) ;
- Rp = SuiteSparse_malloc (n+1, sizeof (Int)) ;
- Ri = SuiteSparse_malloc (nz, sizeof (Int)) ;
+ Rp = (Int *)SuiteSparse_malloc (n+1, sizeof (Int)) ;
+ Ri = (Int *)SuiteSparse_malloc (nz, sizeof (Int)) ;
mem += (n+1) ;
mem += MAX (nz,1) ;
if (!Rp || !Ri)
{
/* :: out of memory :: */
@@ -158,10 +158,10 @@
mem += slen ;
ok = ok && (slen < SIZE_T_MAX / sizeof (Int)) ; /* check for overflow */
ok = ok && (slen < Int_MAX) ; /* S[i] for Int i must be OK */
if (ok)
{
- S = SuiteSparse_malloc (slen, sizeof (Int)) ;
+ S = (Int *)SuiteSparse_malloc (slen, sizeof (Int)) ;
}
AMD_DEBUG1 (("slen %g\n", (scs_float) slen)) ;
if (!S)
{
/* :: out of memory :: (or problem too large) */