[SSSD] NSS: Add config option to expand homedir template format

Lukas Slebodnik lslebodn at redhat.com
Mon Jun 2 16:26:54 UTC 2014


On (02/06/14 12:18), Simo Sorce wrote:
>On Mon, 2014-06-02 at 18:15 +0200, Jakub Hrozek wrote:
>> On Mon, Jun 02, 2014 at 12:01:14PM -0400, Simo Sorce wrote:
>> > > We have a ZERO_STRUCT call precisely for this reason.
>> > 
>> > If it is on the stack, we can simply declare it with a C99 initializer
>> > of 0 ?
>> > Or is this structure reused (hence needs resetting) more than once ?
>> > 
>> > Simo.
>> 
>> btw both clang and gcc complain about uninitialized struct in this
>> case. I consider that a compiler bug, bug it's annoying anyway..
>
>If you set "struct foo var = { 0 };" ?
    gcc warning-less
    clang has warning
src/providers/krb5/krb5_utils.c:1016:28: warning: missing field 'client' initializer
      [-Wmissing-field-initializers]
    krb5_creds mcred = { 0 };
                           ^
>That would be odd.

"struct foo var = {};"
    clang warning-less
    gcc has warning

src/providers/krb5/krb5_utils.c:1016:5: warning: missing initializer for field 'magic' of 'krb5_creds' [-Wmissing-field-initializers]
     krb5_creds mcred = {};
     ^

LS



More information about the sssd-devel mailing list