On 07.05.19 03:36, Paul Smith wrote:
> On Sat, 2019-05-04 at 17:00 -0400, Jeffrey Walton wrote:
>> glob.c:818:27: warning: incompatible pointer types passing 'char **' to
>>       parameter of type 'char *'; dereference with *
>>       [-Wincompatible-pointer-types]
>>             = (char **) realloc (pglob->gl_pathv,
>>                                  ^~~~~~~~~~~~~~~
>>                                  *
> 
> That's odd; realloc() is supposed to take a void* not a char* as the
> first parameter.  Is MacOS really so non-standard?
> 
> 
> _______________________________________________
> Bug-make mailing list
> Bug-make@gnu.org
> https://lists.gnu.org/mailman/listinfo/bug-make
> 

No, the macOS SDKs declare realloc() as

  void * realloc(void *ptr, size_t size);

But it seems that

  http://git.savannah.gnu.org/cgit/make.git/tree/lib/glob.c

redefines realloc as my_malloc, which is defined locally as

  static char *
  my_realloc (p, n)
       char *p;
       unsigned int n;
  // ...
  # define      realloc my_realloc

Martin

_______________________________________________
Bug-make mailing list
Bug-make@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-make

Reply via email to