commit 925c5ff5f882a90fe052cf07826da04b05424ce6
parent 459fb93fabb14c594826da7b89810a2f9a43d4a6
Author: Christian Grothoff <christian@grothoff.org>
Date: Sun, 21 Dec 2025 14:54:47 +0100
fix options-generator.c for C++
Diffstat:
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/include/options-generator.c b/src/include/options-generator.c
@@ -100,7 +100,7 @@ my_asprintf (char **buf,
format,
args);
va_end (args);
- *buf = malloc (ret + 1);
+ *buf = (char *) malloc (ret + 1);
va_start (args,
format);
ret = vsprintf (*buf,
@@ -186,7 +186,7 @@ check (const char *name,
static char *
-indent (char *pfx,
+indent (const char *pfx,
const char *input)
{
char *ret = strdup (input);
@@ -780,8 +780,8 @@ TOP:
exit (2);
}
- *larg = realloc (*larg,
- strlen (*larg) + r + 2);
+ *larg = (char *) realloc (*larg,
+ strlen (*larg) + r + 2);
strcat (*larg,
"\n");
if (0 != strcmp ("+",
@@ -795,7 +795,7 @@ TOP:
continue;
if (NULL == larg)
{
- struct Option *o = malloc (sizeof (struct Option));
+ struct Option *o = (struct Option *) malloc (sizeof (struct Option));
memset (o, 0, sizeof (*o));
if (NULL == head)