Nathaniel McCallum <npmccallum(a)redhat.com> writes:
On Tue, 2016-09-27 at 11:08 -0400, Simo Sorce wrote:
> On Tue, 2016-09-27 at 09:13 -0400, Nathaniel McCallum wrote:
>
>> Why doesn't "gssx_cred remote = {};" work?
>
> I know it should work, and do not know why it didn't, but I pushed
> this patch anyway, I can put in something better later as long as
> clang does not complain.
I suspect that clang is complaining because zero isn't the right value
for the first field of gssx_cred. Simply removing that one byte should
be sufficient to make clang happy.
What is the actual complaint?
Clang says this:
src/mechglue/gpp_creds.c:186:29: warning: suggest braces around
initialization of subobject [-Wmissing-braces]
gssx_cred remote = {0};
^
{}
src/mechglue/gpp_creds.c:186:29: warning: suggest braces around initialization of
subobject [-Wmissing-braces]
gssx_cred remote = {0};
^
{}
2 warnings generated.
and it's warning twice because what it wants to see is `gssx_cred remote
= {{{0}}};`. Given the choice, I prefer the memset() to this notation.