No biggie.  Must keep those compilers happy :)

Reviewed-by: Bill Fischofer <[email protected]>

On Fri, Jul 24, 2015 at 9:53 AM, Mike Holmes <[email protected]> wrote:

>
>
> On 24 July 2015 at 10:49, Bill Fischofer <[email protected]>
> wrote:
>
>> Not sure why this is needed.  Per man:
>>
>>  If *status* is not NULL, *wait*() and *waitpid*() store status information
>>        in the *int* to which it points.
>>
>> Indeed, I poked through those docs too but clang takes the view that it
> cant see the code for wait and so it is possible that an implementation of
> it that is linked to is suspect.
> Unless the setting of the default is a problem for us in our unit test I'd
> like to just kill the noise in the logs.
>
>
>>
>>
>>
>> On Fri, Jul 24, 2015 at 8:49 AM, Mike Holmes <[email protected]>
>> wrote:
>>
>>> It is possible that wait will return a valid pid but have failed to have
>>> set a status. Set a default status so that if this occurs the value will
>>> be known and not garbage.
>>>
>>> Signed-off-by: Mike Holmes <[email protected]>
>>> ---
>>>  helper/linux.c | 2 +-
>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/helper/linux.c b/helper/linux.c
>>> index 4256f43..3d3b6b8 100644
>>> --- a/helper/linux.c
>>> +++ b/helper/linux.c
>>> @@ -198,7 +198,7 @@ int odph_linux_process_wait_n(odph_linux_process_t
>>> *proc_tbl, int num)
>>>  {
>>>         pid_t pid;
>>>         int i, j;
>>> -       int status;
>>> +       int status = 0;
>>>
>>>         for (i = 0; i < num; i++) {
>>>                 pid = wait(&status);
>>> --
>>> 2.1.4
>>>
>>> _______________________________________________
>>> lng-odp mailing list
>>> [email protected]
>>> https://lists.linaro.org/mailman/listinfo/lng-odp
>>>
>>
>>
>
>
> --
> Mike Holmes
> Technical Manager - Linaro Networking Group
> Linaro.org <http://www.linaro.org/> *│ *Open source software for ARM SoCs
>
>
>
_______________________________________________
lng-odp mailing list
[email protected]
https://lists.linaro.org/mailman/listinfo/lng-odp

Reply via email to