mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-05 18:16:23 +03:00
Eliminate compiler warnings on VC++ 14 and CLang.
Remove unused stuff from OSD_WNT.cxx.
This commit is contained in:
parent
20aeeb7be3
commit
d677b21418
@ -560,7 +560,7 @@ Standard_Integer bopcurves (Draw_Interpretor& di,
|
||||
const TopoDS_Face& aF2=*(TopoDS_Face*)(&S2);
|
||||
//
|
||||
Standard_Boolean aToApproxC3d, aToApproxC2dOnS1, aToApproxC2dOnS2, anIsDone;
|
||||
Standard_Integer i, aNbCurves, aNbPoints;
|
||||
Standard_Integer aNbCurves, aNbPoints;
|
||||
Standard_Real anAppTol, aTolR;
|
||||
IntSurf_ListOfPntOn2S aListOfPnts;
|
||||
TCollection_AsciiString aNm("c_"), aNp("p_");
|
||||
@ -636,7 +636,7 @@ Standard_Integer bopcurves (Draw_Interpretor& di,
|
||||
if (aNbCurves) {
|
||||
di << aNbCurves << " curve(s) found.\n";
|
||||
//
|
||||
for (i=1; i<=aNbCurves; i++) {
|
||||
for (Standard_Integer i=1; i<=aNbCurves; i++) {
|
||||
const IntTools_Curve& anIC=aSCs(i);
|
||||
|
||||
Handle (Geom_Curve) aC3D = anIC.Curve();
|
||||
@ -691,7 +691,7 @@ Standard_Integer bopcurves (Draw_Interpretor& di,
|
||||
if (aNbPoints) {
|
||||
di << aNbPoints << " point(s) found.\n";
|
||||
//
|
||||
for (i = 1; i <= aNbPoints; i++) {
|
||||
for (Standard_Integer i = 1; i <= aNbPoints; i++) {
|
||||
const IntTools_PntOn2Faces& aPi = aSPs(i);
|
||||
const gp_Pnt& aP = aPi.P1().Pnt();
|
||||
//
|
||||
|
@ -30,7 +30,7 @@ typedef unsigned long Drawable;
|
||||
|
||||
// Definition de la class Base_Window (Definie dans Draw_Window.cxx)
|
||||
//===================================
|
||||
class Base_Window;
|
||||
struct Base_Window;
|
||||
|
||||
// Definition de la classe Segment
|
||||
//================================
|
||||
|
@ -1425,10 +1425,10 @@ void IntPatch_ImpPrmIntersection::Perform (const Handle(Adaptor3d_HSurface)& Sur
|
||||
|
||||
if(!aRL2.IsNull())
|
||||
{
|
||||
const Handle(Adaptor2d_HCurve2d)& anArc = aRL2->IsArcOnS1() ?
|
||||
const Handle(Adaptor2d_HCurve2d)& anArc2 = aRL2->IsArcOnS1() ?
|
||||
aRL2->ArcOnS1() :
|
||||
aRL2->ArcOnS2();
|
||||
if(anArc->Curve2d().GetType() != GeomAbs_Line)
|
||||
if(anArc2->Curve2d().GetType() != GeomAbs_Line)
|
||||
{
|
||||
//Restriction line must be isoline.
|
||||
//Other cases are not supported by
|
||||
|
@ -59,7 +59,7 @@ public:
|
||||
Standard_EXPORT IntPatch_RLine(const Standard_Boolean Tang);
|
||||
|
||||
//! To add a vertex in the list.
|
||||
virtual void AddVertex (const IntPatch_Point& Pnt);
|
||||
virtual void AddVertex (const IntPatch_Point& Pnt) Standard_OVERRIDE;
|
||||
|
||||
//! Replaces the element of range Index in the list
|
||||
//! of points.
|
||||
@ -118,10 +118,10 @@ public:
|
||||
const IntPatch_Point& LastPoint() const;
|
||||
|
||||
//! Returns number of vertices (IntPatch_Point) of the line
|
||||
virtual Standard_Integer NbVertex() const;
|
||||
virtual Standard_Integer NbVertex() const Standard_OVERRIDE;
|
||||
|
||||
//! Returns the vertex of range Index on the line.
|
||||
virtual const IntPatch_Point& Vertex (const Standard_Integer Index) const;
|
||||
virtual const IntPatch_Point& Vertex (const Standard_Integer Index) const Standard_OVERRIDE;
|
||||
|
||||
Standard_Boolean HasPolygon() const;
|
||||
|
||||
@ -141,10 +141,10 @@ public:
|
||||
Standard_EXPORT void ComputeVertexParameters (const Standard_Real Tol);
|
||||
|
||||
//! Returns set of intersection points
|
||||
Standard_EXPORT virtual Handle(IntSurf_LineOn2S) Curve() const;
|
||||
Standard_EXPORT virtual Handle(IntSurf_LineOn2S) Curve() const Standard_OVERRIDE;
|
||||
|
||||
//! Removes vertices from the line (i.e. cleans svtx member)
|
||||
virtual void ClearVertexes()
|
||||
virtual void ClearVertexes() Standard_OVERRIDE
|
||||
{
|
||||
svtx.Clear();
|
||||
}
|
||||
|
@ -63,7 +63,7 @@ public:
|
||||
Standard_EXPORT IntPatch_WLine(const Handle(IntSurf_LineOn2S)& Line, const Standard_Boolean Tang);
|
||||
|
||||
//! Adds a vertex in the list.
|
||||
virtual void AddVertex (const IntPatch_Point& Pnt);
|
||||
virtual void AddVertex (const IntPatch_Point& Pnt) Standard_OVERRIDE;
|
||||
|
||||
//! Set the Point of index <Index> in the LineOn2S
|
||||
Standard_EXPORT void SetPoint (const Standard_Integer Index, const IntPatch_Point& Pnt);
|
||||
@ -109,10 +109,10 @@ public:
|
||||
const IntPatch_Point& LastPoint (Standard_Integer& Indlast) const;
|
||||
|
||||
//! Returns number of vertices (IntPatch_Point) of the line
|
||||
virtual Standard_Integer NbVertex() const;
|
||||
virtual Standard_Integer NbVertex() const Standard_OVERRIDE;
|
||||
|
||||
//! Returns the vertex of range Index on the line.
|
||||
virtual const IntPatch_Point& Vertex (const Standard_Integer Index) const;
|
||||
virtual const IntPatch_Point& Vertex (const Standard_Integer Index) const Standard_OVERRIDE;
|
||||
|
||||
//! Set the parameters of all the vertex on the line.
|
||||
//! if a vertex is already in the line,
|
||||
@ -121,7 +121,7 @@ public:
|
||||
Standard_EXPORT void ComputeVertexParameters (const Standard_Real Tol, const Standard_Boolean hasBeenAdded = Standard_False);
|
||||
|
||||
//! Returns set of intersection points
|
||||
Standard_EXPORT virtual Handle(IntSurf_LineOn2S) Curve() const;
|
||||
Standard_EXPORT virtual Handle(IntSurf_LineOn2S) Curve() const Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT Standard_Boolean IsOutSurf1Box (const gp_Pnt2d& P1);
|
||||
|
||||
@ -152,7 +152,7 @@ public:
|
||||
Standard_EXPORT const Handle(Adaptor2d_HCurve2d)& GetArcOnS2() const;
|
||||
|
||||
//! Removes vertices from the line (i.e. cleans svtx member)
|
||||
virtual void ClearVertexes();
|
||||
virtual void ClearVertexes() Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT void RemoveVertex (const Standard_Integer theIndex);
|
||||
|
||||
|
@ -34,7 +34,6 @@
|
||||
//#include <ctype.h>
|
||||
|
||||
const int XML_MIN_BUFFER = 10;
|
||||
const int FILE_NONVALUE = -1;
|
||||
|
||||
typedef enum {
|
||||
STATE_WAITING = 0,
|
||||
|
@ -518,162 +518,8 @@ void FreeFileSecurity ( PSECURITY_DESCRIPTOR pSD ) {
|
||||
HeapFree ( hHeap, 0, ( LPVOID )pSD );
|
||||
|
||||
} /* end FreeFileSecurity */
|
||||
/***/
|
||||
/******************************************************************************/
|
||||
/* Function : LookupAccountSidEx */
|
||||
/* Purpose : Looking for account corresponding to the given SID and returns*/
|
||||
/* a name of that account on success */
|
||||
/* Returns : TRUE if account was found in the security database */
|
||||
/* FALSE otherwise */
|
||||
/* Warning : If account was found then this function allocates memory */
|
||||
/* needed to hold the name of that account and the name of the */
|
||||
/* domain to which this account belongs. To free that memoty */
|
||||
/* use 'FreeAccountNames' function */
|
||||
/******************************************************************************/
|
||||
/***/
|
||||
|
||||
#if defined(__CYGWIN32__) || defined(__MINGW32__)
|
||||
#define __try
|
||||
#define __finally
|
||||
#define __leave return retVal
|
||||
#endif
|
||||
|
||||
BOOL LookupAccountSidEx ( PSID pSID, LPWSTR* name, LPWSTR* domain ) {
|
||||
|
||||
DWORD errVal;
|
||||
DWORD dwSizeName = 0;
|
||||
DWORD dwSizeDomain = 0;
|
||||
BOOL retVal = FALSE;
|
||||
SID_NAME_USE eUse;
|
||||
|
||||
__try {
|
||||
|
||||
do {
|
||||
|
||||
errVal = ERROR_SUCCESS;
|
||||
|
||||
if ( !LookupAccountSidW (
|
||||
NULL, pSID, *name, &dwSizeName, *domain, &dwSizeDomain, &eUse
|
||||
)
|
||||
) {
|
||||
|
||||
if ( ( errVal = GetLastError () ) != ERROR_INSUFFICIENT_BUFFER ) __leave;
|
||||
|
||||
if ( ( *name = ( LPWSTR )HeapAlloc ( hHeap, 0, dwSizeName ) ) == NULL ||
|
||||
( *domain = ( LPWSTR )HeapAlloc ( hHeap, 0, dwSizeDomain ) ) == NULL
|
||||
) __leave;
|
||||
|
||||
} /* end if */
|
||||
|
||||
} while ( errVal != ERROR_SUCCESS );
|
||||
|
||||
retVal = TRUE;
|
||||
|
||||
} /* end __try */
|
||||
|
||||
__finally {
|
||||
|
||||
if ( !retVal ) {
|
||||
|
||||
if ( *name == NULL ) HeapFree ( hHeap, 0, *name );
|
||||
if ( *domain == NULL ) HeapFree ( hHeap, 0, *domain );
|
||||
|
||||
} /* end if */
|
||||
|
||||
} /* end __finally */
|
||||
|
||||
#ifdef VAC
|
||||
leave: ; // added for VisualAge
|
||||
#endif
|
||||
|
||||
return retVal;
|
||||
|
||||
} /* end LookupAccountSidEx */
|
||||
|
||||
#if defined(__CYGWIN32__) || defined(__MINGW32__)
|
||||
#undef __try
|
||||
#undef __finally
|
||||
#undef __leave
|
||||
#endif
|
||||
|
||||
/***/
|
||||
/******************************************************************************/
|
||||
/* Function : FreeAccountNames */
|
||||
/* Purpose : Deallocates memory which was allocated by the */
|
||||
/* 'LookupAccountSidEx' function */
|
||||
/******************************************************************************/
|
||||
/***/
|
||||
void FreeAccountNames ( LPWSTR lpszName, LPWSTR lpszDomain ) {
|
||||
|
||||
HeapFree ( hHeap, 0, ( PVOID )lpszDomain );
|
||||
HeapFree ( hHeap, 0, ( PVOID )lpszName );
|
||||
|
||||
} /* end FreeAccountNames */
|
||||
/***/
|
||||
/******************************************************************************/
|
||||
/* Function : GetSecurityDescriptorOwnerEx */
|
||||
/* Purpose : Returns owner SID in the specified security descriptor. */
|
||||
/* If specified security descriptor does not have an owner field */
|
||||
/* then returns NULL */
|
||||
/******************************************************************************/
|
||||
/***/
|
||||
PSID GetSecurityDescriptorOwnerEx ( PSECURITY_DESCRIPTOR pSD ) {
|
||||
|
||||
BOOL bDummy;
|
||||
PSID retVal;
|
||||
|
||||
if ( !GetSecurityDescriptorOwner ( pSD, &retVal, &bDummy ) )
|
||||
|
||||
retVal = NULL;
|
||||
|
||||
return retVal;
|
||||
|
||||
} /* end GetSecurityDescriptorOwnerEx */
|
||||
/***/
|
||||
/******************************************************************************/
|
||||
/* Function : GetSecurityDescriptorGroupEx */
|
||||
/* Purpose : Returns primary group SID in the specified security */
|
||||
/* descriptor. If specified security descriptor does not have a */
|
||||
/* primary group field then returns NULL */
|
||||
/******************************************************************************/
|
||||
/***/
|
||||
PSID GetSecurityDescriptorGroupEx ( PSECURITY_DESCRIPTOR pSD ) {
|
||||
|
||||
BOOL bDummy;
|
||||
PSID retVal;
|
||||
|
||||
if ( !GetSecurityDescriptorGroup ( pSD, &retVal, &bDummy ) )
|
||||
|
||||
retVal = NULL;
|
||||
|
||||
return retVal;
|
||||
|
||||
} /* end GetSecurityDescriptorGroupEx */
|
||||
/***/
|
||||
/******************************************************************************/
|
||||
/* Function : GetSecurityDescriptorDaclEx */
|
||||
/* Purpose : Returns a pointer to the discretionary access-control list in */
|
||||
/* the specified security descriptor. If specified security */
|
||||
/* descriptor does not have a discretionary access-control list */
|
||||
/* then returns NULL */
|
||||
/******************************************************************************/
|
||||
/***/
|
||||
PACL GetSecurityDescriptorDaclEx ( PSECURITY_DESCRIPTOR pSD ) {
|
||||
|
||||
PACL retVal;
|
||||
BOOL bDummy;
|
||||
BOOL fPresent;
|
||||
|
||||
if ( !GetSecurityDescriptorDacl ( pSD, &fPresent, &retVal, &bDummy ) ||
|
||||
!fPresent
|
||||
)
|
||||
|
||||
retVal = NULL;
|
||||
|
||||
return retVal;
|
||||
|
||||
} /* end GetSecurityDescriptorDaclEx */
|
||||
/***/
|
||||
/******************************************************************************/
|
||||
/* Function : CreateAcl */
|
||||
/* Purpose : Allocates and initializes access-control list */
|
||||
@ -707,140 +553,7 @@ void FreeAcl ( PACL pACL ) {
|
||||
HeapFree ( hHeap, 0, ( PVOID )pACL );
|
||||
|
||||
} /* end FreeAcl */
|
||||
/***/
|
||||
/******************************************************************************/
|
||||
/* Function : CopySidEx */
|
||||
/* Purpose : Makes a copy of the SID */
|
||||
/* Returns : Pointer to the copy of the specified SID on success, */
|
||||
/* NULL otherwise */
|
||||
/* Warning : Allocated SID must be deallocated by 'FreeSidEx' function */
|
||||
/******************************************************************************/
|
||||
/***/
|
||||
PSID CopySidEx ( PSID pSIDsrc ) {
|
||||
|
||||
DWORD dwLen;
|
||||
PSID retVal;
|
||||
|
||||
dwLen = GetLengthSid ( pSIDsrc );
|
||||
retVal = ( PSID )HeapAlloc ( hHeap, 0, dwLen );
|
||||
|
||||
if ( retVal != NULL )
|
||||
|
||||
CopySid ( dwLen, retVal, pSIDsrc );
|
||||
|
||||
return retVal;
|
||||
|
||||
} /* end CopySidEx */
|
||||
/***/
|
||||
/******************************************************************************/
|
||||
/* Function : FreeSidEx */
|
||||
/* Purpose : Deallocates SID which was allocated by the 'CopySidEx' */
|
||||
/* function */
|
||||
/******************************************************************************/
|
||||
/***/
|
||||
void FreeSidEx ( PSID pSID ) {
|
||||
|
||||
HeapFree ( hHeap, 0, pSID );
|
||||
|
||||
} /* end FreeSidEx */
|
||||
/***/
|
||||
/******************************************************************************/
|
||||
/* Function : AllocGroupSid */
|
||||
/* Purpose : Allocates a structure which holds SIDs of groups which are */
|
||||
/* not predefined. These SIDs is taking from the DACL of the */
|
||||
/* specified security descriptor */
|
||||
/* Returns : Pointer the allocated structure on success, */
|
||||
/* NULL otherwise */
|
||||
/* Warning : Allocated structure must be deallocated by 'FreeGroupSid' */
|
||||
/* function */
|
||||
/******************************************************************************/
|
||||
/***/
|
||||
PGROUP_SID AllocGroupSid ( PSECURITY_DESCRIPTOR pSD ) {
|
||||
|
||||
int i;
|
||||
PGROUP_SID retVal = NULL;
|
||||
PSID* pSID = NULL;
|
||||
DWORD dwLen;
|
||||
DWORD dwCount = 0;
|
||||
LPVOID pACE;
|
||||
PACL pACL;
|
||||
PSID pSIDowner;
|
||||
PSID pSIDadmin;
|
||||
PSID pSIDworld;
|
||||
BOOL fPresent;
|
||||
BOOL fDefaulted;
|
||||
|
||||
if ( GetSecurityDescriptorDacl ( pSD, &fPresent, &pACL, &fDefaulted ) &&
|
||||
fPresent &&
|
||||
GetSecurityDescriptorOwner ( pSD, &pSIDowner, &fDefaulted ) &&
|
||||
pSIDowner != NULL &&
|
||||
( retVal = ( PGROUP_SID )HeapAlloc ( hHeap, 0, sizeof ( GROUP_SID ) ) ) !=
|
||||
NULL
|
||||
) {
|
||||
|
||||
pSIDadmin = AdminSid ();
|
||||
pSIDworld = WorldSid ();
|
||||
|
||||
for ( i = 0; i < ( int )pACL -> AceCount; ++i )
|
||||
if ( GetAce ( pACL, i, &pACE ) &&
|
||||
!EqualSid ( pSIDadmin, GET_SID( pACE ) ) &&
|
||||
!EqualSid ( pSIDworld, GET_SID( pACE ) ) &&
|
||||
!EqualSid ( pSIDowner, GET_SID( pACE ) ) )
|
||||
++dwCount;
|
||||
|
||||
pSID = ( PSID* )HeapAlloc ( hHeap, 0, dwCount * sizeof ( PSID ) );
|
||||
dwCount = 0;
|
||||
|
||||
if ( pSID != NULL ) {
|
||||
|
||||
for ( i = 0; i < ( int )pACL -> AceCount; ++i )
|
||||
|
||||
if ( GetAce ( pACL, i, &pACE ) &&
|
||||
!EqualSid ( pSIDadmin, GET_SID( pACE ) ) &&
|
||||
!EqualSid ( pSIDworld, GET_SID( pACE ) ) &&
|
||||
!EqualSid ( pSIDowner, GET_SID( pACE ) )
|
||||
) {
|
||||
|
||||
pSID[ dwCount ] = ( PSID )HeapAlloc (
|
||||
hHeap, 0, dwLen = GetLengthSid ( GET_SID( pACE ) )
|
||||
);
|
||||
|
||||
if ( pSID[ dwCount ] != NULL )
|
||||
|
||||
CopySid ( dwLen, pSID[ dwCount++ ], GET_SID( pACE ) );
|
||||
|
||||
} /* end if */
|
||||
|
||||
} /* end if */
|
||||
|
||||
retVal -> nCount = dwCount;
|
||||
retVal -> pSID = pSID;
|
||||
|
||||
} /* end if */
|
||||
|
||||
return retVal;
|
||||
|
||||
} /* end AllocGroupSid */
|
||||
/***/
|
||||
/******************************************************************************/
|
||||
/* Function : FreeGroupSid */
|
||||
/* Purpose : Deallocates a structure which was allocated by the */
|
||||
/* 'AllocGroupSid' function */
|
||||
/******************************************************************************/
|
||||
/***/
|
||||
void FreeGroupSid ( PGROUP_SID pGSID ) {
|
||||
|
||||
int i;
|
||||
|
||||
for ( i = 0; i < ( int )pGSID -> nCount; ++i )
|
||||
|
||||
HeapFree ( hHeap, 0, pGSID -> pSID[ i ] );
|
||||
|
||||
HeapFree ( hHeap, 0, pGSID -> pSID );
|
||||
HeapFree ( hHeap, 0, pGSID );
|
||||
|
||||
} /* end FreeGroupSid */
|
||||
/***/
|
||||
/******************************************************************************/
|
||||
/* Function : AllocAccessAllowedAce */
|
||||
/* Purpose : Allocates and initializes access-control entry */
|
||||
|
@ -45,8 +45,6 @@ extern "C" {
|
||||
|
||||
enum DIR_RESPONSE { DIR_ABORT, DIR_RETRY, DIR_IGNORE };
|
||||
|
||||
enum MB_ITEMTYPE { MBT_BUTTON, MBT_ICON };
|
||||
|
||||
#define FLAG_READ_PIPE 0x00000001
|
||||
#define FLAG_EOF 0x00000002
|
||||
#define FLAG_FILE 0x00000004
|
||||
@ -64,22 +62,6 @@ enum MB_ITEMTYPE { MBT_BUTTON, MBT_ICON };
|
||||
#define LODWORD( a ) ( DWORD )( ( ( _int64 )( a ) ) & 0x00000000FFFFFFFF )
|
||||
#define HIDWORD( a ) ( DWORD )( ( ( _int64 )( a ) ) >> 32 )
|
||||
|
||||
typedef struct _group_sid {
|
||||
|
||||
DWORD nCount;
|
||||
PSID* pSID;
|
||||
|
||||
} GROUP_SID, *PGROUP_SID;
|
||||
|
||||
typedef struct _MB_DESC {
|
||||
|
||||
MB_ITEMTYPE itemType;
|
||||
int itemId;
|
||||
char* buttonLabel;
|
||||
|
||||
} MB_DESC, *LPMB_DESC;
|
||||
|
||||
|
||||
typedef struct _file_ace {
|
||||
|
||||
ACE_HEADER header;
|
||||
@ -114,13 +96,6 @@ void OSDAPI FreeTokenInformation ( LPVOID );
|
||||
PSECURITY_DESCRIPTOR OSDAPI GetFileSecurityEx ( LPCWSTR, SECURITY_INFORMATION );
|
||||
void OSDAPI FreeFileSecurity ( PSECURITY_DESCRIPTOR );
|
||||
|
||||
BOOL OSDAPI LookupAccountSidEx ( PSID, LPWSTR*, LPWSTR* );
|
||||
void OSDAPI FreeAccountNames ( LPWSTR, LPWSTR );
|
||||
|
||||
PSID OSDAPI GetSecurityDescriptorOwnerEx ( PSECURITY_DESCRIPTOR );
|
||||
PSID OSDAPI GetSecurityDescriptorGroupEx ( PSECURITY_DESCRIPTOR );
|
||||
PACL OSDAPI GetSecurityDescriptorDaclEx ( PSECURITY_DESCRIPTOR );
|
||||
|
||||
PACL OSDAPI CreateAcl ( DWORD );
|
||||
void OSDAPI FreeAcl ( PACL );
|
||||
|
||||
@ -137,12 +112,6 @@ PSID OSDAPI CreatorOwnerSid ( void );
|
||||
PSID OSDAPI NullSid ( void );
|
||||
PSID OSDAPI NtSid ( void );
|
||||
|
||||
PSID OSDAPI CopySidEx ( PSID );
|
||||
void OSDAPI FreeSidEx ( PSID );
|
||||
|
||||
PGROUP_SID OSDAPI AllocGroupSid ( PSECURITY_DESCRIPTOR );
|
||||
void OSDAPI FreeGroupSid ( PGROUP_SID );
|
||||
|
||||
PVOID OSDAPI AllocAccessAllowedAce ( DWORD, BYTE, PSID );
|
||||
void OSDAPI FreeAce ( PVOID );
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user