>>>>> "Andres" == Andres Freund <andres@anarazel.de> writes:
Andres> We usually cast the result of palloc.
>> Rough count in the backend has ~400 without casts to ~1350 with, so>> this doesn't seem to have been consistently
enforced.
Andres> Yea, but we're still trying.
Well, a lot of the uncasted ones are in fairly new code, from quite a
number of different committers.
So if this is a big deal, why don't we already have
#define palloc_array(etype,ecount) (((etype) *) palloc((ecount) * sizeof(etype)))
#define palloc_object(otype) (((otype) *) palloc(sizeof(otype)))
or something of that ilk?
--
Andrew (irc:RhodiumToad)