Re: Allocator sizeof operand mismatch (src/backend/regex/regcomp.c)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Zhang Mingli <zmlpostgres(at)gmail(dot)com>
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>, Ranier Vilela <ranier(dot)vf(at)gmail(dot)com>
Subject: Re: Allocator sizeof operand mismatch (src/backend/regex/regcomp.c)
Date: 2022-08-06 14:47:25
Message-ID: 9352.1659797245@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Zhang Mingli <zmlpostgres(at)gmail(dot)com> writes:
> I think it’s ok, re_guts is converted when  used
> (struct guts *) re->re_guts;
> And there is comments in regex.h
> char *re_guts; /* `char *' is more portable than `void *' */

Boy, that comment is showing its age isn't it? If we were to do
anything about this, I'd be more inclined to change re_guts to void*.
But, never having seen any compiler warnings about this code,
I don't feel a strong need to do something.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Joe Conway 2022-08-06 14:59:26 Re: [PATCH] Expose port->authn_id to extensions and triggers
Previous Message Tom Lane 2022-08-06 14:41:09 Re: `make check` doesn't pass on MacOS Catalina