From: szy Date: Wed, 26 Mar 2014 12:49:44 +0000 (+0400) Subject: 0024535: Bad type cast in TDocStd_Document::Update() X-Git-Tag: V6_7_1_beta~22 X-Git-Url: http://git.dev.opencascade.org/gitweb/?a=commitdiff_plain;h=d347054cd0c4347a3a62b1c51f9bdc683f241a0c;p=occt-copy.git 0024535: Bad type cast in TDocStd_Document::Update() Eliminating of GCC compiler warning on breakage of C pointer aliasing rules. --- diff --git a/src/TDocStd/TDocStd_Document.cxx b/src/TDocStd/TDocStd_Document.cxx index 29822a3ba0..0247be6c36 100644 --- a/src/TDocStd/TDocStd_Document.cxx +++ b/src/TDocStd/TDocStd_Document.cxx @@ -224,8 +224,8 @@ void TDocStd_Document::Update(const Handle(CDM_Document)& /*aToDocument*/, const Standard_Integer aReferenceIdentifier, const Standard_Address aModifContext) { - const TDocStd_Context CC = *((TDocStd_Context *)&aModifContext); - if (CC.ModifiedReferences() || !IsUpToDate(aReferenceIdentifier)) { + const TDocStd_Context* CC = static_cast (aModifContext); + if (CC->ModifiedReferences() || !IsUpToDate(aReferenceIdentifier)) { TCollection_AsciiString aDocEntry(aReferenceIdentifier); UpdateReferences(aDocEntry); SetIsUpToDate(aReferenceIdentifier);