On 15/05/2009 20:17, Dominique Pellé wrote:
> On Fri, May 15, 2009 at 8:23 PM, Bram Moolenaar <[email protected]> wrote:
> 
>> Dasn wrote:
>>
>>> Hi, when compiling 7.2-1-173 on OpenBSD, I got:
>>>
>>>> if_cscope.c: In function `cs_create_connection':
>>>> if_cscope.c:997: warning: missing sentinel in function call
>>> Not a big problem, should be easy to fix:
>>>
>>> *** if_cscope.c 22 Apr 2009 14:25:01 -0000      1.36
>>> --- if_cscope.c 14 May 2009 23:07:54 -0000
>>> *************** err_closing:
>>> *** 994, 1000 ****
>>>         vim_free(ppath);
>>>
>>>   #if defined(UNIX)
>>> !       if (execl("/bin/sh", "sh", "-c", cmd, NULL) == -1)
>>>             PERROR(_("cs_create_connection exec failed"));
>>>
>>>         exit(127);
>>> --- 994, 1000 ----
>>>         vim_free(ppath);
>>>
>>>   #if defined(UNIX)
>>> !       if (execl("/bin/sh", "sh", "-c", cmd, (char *) NULL) == -1)
>>>             PERROR(_("cs_create_connection exec failed"));
>>>
>>>         exit(127);
>> Strange warning.  But the fix shouldn't hurt anyone.
> 
> 
> The man page of execl(3) on Linux says...
> 
> ===========================================
> The list of arguments must be terminated by a NULL pointer,
> and, since these are  variadic functions, this pointer must be
> cast (char *) NULL.
> ===========================================
> 
> So the proposed fix seems ok.
> -- Dominique

On OpenBSD NULL is defined as 0L which is not a null pointer constant in 
variadic function call and needs to be cast to pass a NULL pointer.

Mike
-- 
A complex system that works is invariably found to have evolved from a 
simple system that worked.

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Raspunde prin e-mail lui