From bce319e401ec457b58a213afde42d0ddf425a1a1 Mon Sep 17 00:00:00 2001
From: Mathieu Faverge <mathieu.faverge@inria.fr>
Date: Fri, 2 Sep 2022 00:12:11 +0200
Subject: [PATCH] Change the chameleon_asprintf prototype to match asprintf

---
 control/common.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/control/common.h b/control/common.h
index d68934a6c..888cdedf7 100644
--- a/control/common.h
+++ b/control/common.h
@@ -119,19 +119,19 @@ void chameleon_pclag2z(CHAM_context_t *chamctxt);
 */
 
 #if defined(__GNUC__)
-static inline void chameleon_asprintf( char **strp, const char *fmt, ... ) __attribute__((format(printf,2,3)));
+static inline int chameleon_asprintf( char **strp, const char *fmt, ... ) __attribute__((format(printf,2,3)));
 #endif
-static inline void chameleon_asprintf( char **strp, const char *fmt, ... )
+static inline int chameleon_asprintf( char **strp, const char *fmt, ... )
 {
     va_list ap;
     int rc;
 
     va_start( ap, fmt );
     rc = asprintf( strp, fmt, ap );
-    va_end(ap);
+    va_end( ap );
 
     assert( rc != -1 );
-    (void)rc;
+    return rc;
 }
 
 #ifdef __cplusplus
-- 
GitLab