Hi,

About the error:
Result of 'malloc' is converted to a pointer of type 'char', which is
incompatible with sizeof operand type 'struct guts'

The patch attached tries to fix this.

regards,
Ranier Vilela
diff --git a/src/backend/regex/regcomp.c b/src/backend/regex/regcomp.c
index 473738040b..56e5ab1e84 100644
--- a/src/backend/regex/regcomp.c
+++ b/src/backend/regex/regcomp.c
@@ -389,7 +389,7 @@ pg_regcomp(regex_t *re,
 	re->re_fns = VS(&functions);
 
 	/* more complex setup, malloced things */
-	re->re_guts = VS(MALLOC(sizeof(struct guts)));
+	re->re_guts = (struct guts *) MALLOC(sizeof(struct guts));
 	if (re->re_guts == NULL)
 		return freev(v, REG_ESPACE);
 	g = (struct guts *) re->re_guts;

Reply via email to