1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-14 13:30:48 +03:00

0030611: Coding Rules - eliminate GCC compiler warnings -Wcatch-value

Add missing const& to catch statements.
This commit is contained in:
kgv
2019-03-31 23:38:14 +03:00
parent f996b507d8
commit a738b534ca
106 changed files with 210 additions and 213 deletions

View File

@@ -60,13 +60,13 @@ Standard_Boolean Storage_HeaderData::Read (Storage_BaseDriver& theDriver)
myDataType,
myUserInfo);
}
catch (Storage_StreamTypeMismatchError)
catch (Storage_StreamTypeMismatchError const&)
{
myErrorStatus = Storage_VSTypeMismatch;
myErrorStatusExt = "ReadInfo";
return Standard_False;
}
catch (Storage_StreamExtCharParityError)
catch (Storage_StreamExtCharParityError const&)
{
myErrorStatus = Storage_VSExtCharParityError;
myErrorStatusExt = "ReadInfo";
@@ -95,13 +95,13 @@ Standard_Boolean Storage_HeaderData::Read (Storage_BaseDriver& theDriver)
OCC_CATCH_SIGNALS
theDriver.ReadComment (myComments);
}
catch (Storage_StreamTypeMismatchError)
catch (Storage_StreamTypeMismatchError const&)
{
myErrorStatus = Storage_VSTypeMismatch;
myErrorStatusExt = "ReadComment";
return Standard_False;
}
catch (Storage_StreamExtCharParityError)
catch (Storage_StreamExtCharParityError const&)
{
myErrorStatus = Storage_VSExtCharParityError;
myErrorStatusExt = "ReadComment";

View File

@@ -59,7 +59,7 @@ Standard_Boolean Storage_RootData::Read (Storage_BaseDriver& theDriver)
OCC_CATCH_SIGNALS
theDriver.ReadRoot (aRootName, aRef, aTypeName);
}
catch (Storage_StreamTypeMismatchError)
catch (Storage_StreamTypeMismatchError const&)
{
myErrorStatus = Storage_VSTypeMismatch;
myErrorStatusExt = "ReadRoot";

View File

@@ -484,7 +484,7 @@ void Storage_Schema::Write
errorContext = "EndWriteDataSection";
f.EndWriteDataSection();
}
catch(Storage_StreamWriteError) {
catch(Storage_StreamWriteError const&) {
aData->SetErrorStatus(Storage_VSWriteError);
aData->SetErrorStatusExtension(errorContext);
}