This is the mail archive of the
cygwin-patches@cygwin.com
mailing list for the Cygwin project.
Re: w32api compiler warning fix.
On Fri, Nov 09, 2001 at 11:55:30AM +1100, Danny Smith wrote:
>
> > But that's still not the definition as it's given by MS.
> >
> > Hmm,
> > Corinna
> >
>
> Okay. Point taken (finally). I have no problems with your solution (leave
> the header alone, add the brackets in user code).
>
> Usage of these defines in MSDN sample code imply that following is correct:
> SID_IDENTIFIER_AUTHORITY aNullSidAuthority = SECURITY_NULL_SID_AUTHORITY;
> yet it raises warnings on GCC. Sooner or later someone else will propose
> the same "fix" as Robert. And perhaps the same discussion will follow.
> Should we document the gcc vs msvc diff in the header? Like so:
> /*
> To prevent gcc compiler warnings, bracket these defines when initialising
> a SID_IDENTIFIER_AUTHORITY, eg.
> SID_IDENTIFIER_AUTHORITY aNullSidAuthority = {SECURITY_NULL_SID_AUTHORITY};
> */
> #define SECURITY_NULL_SID_AUTHORITY {0,0,0,0,0,0}
Adding a comment sounds like a good idea. I saw that Robert has
just reverted the patch. Robert, would you agree with the comment?
If so, I would add it.
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Developer mailto:cygwin@cygwin.com
Red Hat, Inc.