This is the mail archive of the cygwin-patches@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: w32api compiler warning fix.



> 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}

Danny

 
Danny
 

http://briefcase.yahoo.com.au - Yahoo! Briefcase
- Manage your files online.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]