On Apr 10, 2016, at 1:44 PM, Graham Bloice <graham.bloice@xxxxxxxxxxxxx> wrote:
> After creating an initial change to add checkAPI to CMake builds, following the current checks done by nmake, I got the attached (massaged) output.
>
> While there are some warnings to be fixed up, I'm more interested in the errors as they'll make a build as bad until fixed. Are these errors ones that should be fixed, or should the offending files be excluded from checkAPI.
Or should we reconsider banning those functions?
The only "benefit" of g_malloc is that, if the allocation fails, instead of returning a null pointer that later causes a crash *if* you don't bother checking for a memory allocation failure, it just calls abort() and crashes immediately.
The code generated by Flex *does* check for a memory allocation failure, so there's no benefit to using g_malloc() there.