[systemd-devel] [PATCH] sysusers: fix uninitialized warning

Tom Gundersen teg at jklm.no
Sun Jul 6 05:16:31 PDT 2014


On Sun, Jul 6, 2014 at 2:14 PM, Ronny Chevalier
<chevalier.ronny at gmail.com> wrote:
> 2014-07-06 14:06 GMT+02:00 Tom Gundersen <teg at jklm.no>:
>> On Sun, Jul 6, 2014 at 1:33 PM, Ronny Chevalier
>> <chevalier.ronny at gmail.com> wrote:
>>> ---
>>>  src/sysusers/sysusers.c | 2 ++
>>>  1 file changed, 2 insertions(+)
>>>
>>> diff --git a/src/sysusers/sysusers.c b/src/sysusers/sysusers.c
>>> index 1209a5a..c0af693 100644
>>> --- a/src/sysusers/sysusers.c
>>> +++ b/src/sysusers/sysusers.c
>>> @@ -1312,6 +1312,8 @@ static int parse_line(const char *fname, unsigned line, const char *buffer) {
>>>
>>>                  h = groups;
>>>                  break;
>>> +        default:
>>> +                return -EBADMSG;
>>>          }
>>
>> Hm, this code-path should never happen, right? Is your compiler complaining?
>>
>> -t
> Yes because it doesn't know that the IN_SET forbid this. So it just
> fix the warning.

Fair enough then. Applied.

Thanks!

Tom


More information about the systemd-devel mailing list