SuperLU/SuperLU-fix-align-declarations-malloc.patch

44 lines
1.8 KiB
Diff
Raw Normal View History

2023-07-15 09:57:53 +00:00
From c5de971c4dd754da1040121aa5e3a3c00932e3b7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Christoph=20Gr=C3=BCninger?= <foss@grueninger.de>
Date: Sun, 4 Jun 2023 23:12:49 +0200
Subject: [PATCH] Adjust forward delcaration of float/double Malloc/Calloc
The argument was changed in slu_sdefs.h / slu_ddefs.h and
remained in slu_cdefs.h / slu_zdefs.h. This leads to
incompatible declarations.
---
SRC/slu_cdefs.h | 4 ++--
SRC/slu_zdefs.h | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/SRC/slu_cdefs.h b/SRC/slu_cdefs.h
index 0cb20900..5d5a5529 100644
--- a/SRC/slu_cdefs.h
+++ b/SRC/slu_cdefs.h
@@ -236,8 +236,8 @@ extern int_t cLUMemXpand (int, int_t, MemType, int_t *, GlobalLU_t *);
extern complex *complexMalloc(size_t);
extern complex *complexCalloc(size_t);
-extern float *floatMalloc(int);
-extern float *floatCalloc(int);
+extern float *floatMalloc(size_t);
+extern float *floatCalloc(size_t);
extern int_t cmemory_usage(const int_t, const int_t, const int_t, const int);
extern int cQuerySpace (SuperMatrix *, SuperMatrix *, mem_usage_t *);
extern int ilu_cQuerySpace (SuperMatrix *, SuperMatrix *, mem_usage_t *);
diff --git a/SRC/slu_zdefs.h b/SRC/slu_zdefs.h
index ba5d8636..c6418d58 100644
--- a/SRC/slu_zdefs.h
+++ b/SRC/slu_zdefs.h
@@ -236,8 +236,8 @@ extern int_t zLUMemXpand (int, int_t, MemType, int_t *, GlobalLU_t *);
extern doublecomplex *doublecomplexMalloc(size_t);
extern doublecomplex *doublecomplexCalloc(size_t);
-extern double *doubleMalloc(int);
-extern double *doubleCalloc(int);
+extern double *doubleMalloc(size_t);
+extern double *doubleCalloc(size_t);
extern int_t zmemory_usage(const int_t, const int_t, const int_t, const int);
extern int zQuerySpace (SuperMatrix *, SuperMatrix *, mem_usage_t *);
extern int ilu_zQuerySpace (SuperMatrix *, SuperMatrix *, mem_usage_t *);