Skip to content

Commit

Permalink
Add //NOSONAR to the "unhandled exception" catches that SonarCloud
Browse files Browse the repository at this point in the history
identifies as vulnerabilities, to suppress the warning. In each of
these cases, a comment explains that no action is called for in the
catch, so it should not, in fact, be regarded as a bug or
vulnerability.

Signed-off-by: Cary Phillips <[email protected]>
  • Loading branch information
cary-ilm committed Aug 6, 2019
1 parent 220cfcd commit c46428a
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion OpenEXR/IlmImf/ImfDeepScanLineInputFile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ reconstructLineOffsets (OPENEXR_IMF_INTERNAL_NAMESPACE::IStream &is,
lineOffsets[lineOffsets.size() - i - 1] = lineOffset;
}
}
catch (...)
catch (...) //NOSONAR - suppress vulnerability reports from SonarCloud.
{
//
// Suppress all exceptions. This functions is
Expand Down
2 changes: 1 addition & 1 deletion OpenEXR/IlmImf/ImfDeepScanLineOutputFile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1001,7 +1001,7 @@ DeepScanLineOutputFile::~DeepScanLineOutputFile ()
//
_data->_streamData->os->seekp (originalPosition);
}
catch (...)
catch (...) //NOSONAR - suppress vulnerability reports from SonarCloud.
{
//
// We cannot safely throw any exceptions from here.
Expand Down
2 changes: 1 addition & 1 deletion OpenEXR/IlmImf/ImfDeepTiledOutputFile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1273,7 +1273,7 @@ DeepTiledOutputFile::~DeepTiledOutputFile ()
//
_data->_streamData->os->seekp (originalPosition);
}
catch (...)
catch (...) //NOSONAR - suppress vulnerability reports from SonarCloud.
{
//
// We cannot safely throw any exceptions from here.
Expand Down
2 changes: 1 addition & 1 deletion OpenEXR/IlmImf/ImfMultiPartInputFile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -683,7 +683,7 @@ MultiPartInputFile::Data::chunkOffsetReconstruction(OPENEXR_IMF_INTERNAL_NAMESPA
}

}
catch (...)
catch (...) //NOSONAR - suppress vulnerability reports from SonarCloud.
{
//
// Suppress all exceptions. This functions is
Expand Down
2 changes: 1 addition & 1 deletion OpenEXR/IlmImf/ImfOutputFile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -871,7 +871,7 @@ OutputFile::~OutputFile ()
//
_data->_streamData->os->seekp (originalPosition);
}
catch (...)
catch (...) //NOSONAR - suppress vulnerability reports from SonarCloud.
{
//
// We cannot safely throw any exceptions from here.
Expand Down
2 changes: 1 addition & 1 deletion OpenEXR/IlmImf/ImfScanLineInputFile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ reconstructLineOffsets (OPENEXR_IMF_INTERNAL_NAMESPACE::IStream &is,
lineOffsets[lineOffsets.size() - i - 1] = lineOffset;
}
}
catch (...)
catch (...) //NOSONAR - suppress vulnerability reports from SonarCloud.
{
//
// Suppress all exceptions. This functions is
Expand Down
2 changes: 1 addition & 1 deletion OpenEXR/IlmImf/ImfTileOffsets.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ TileOffsets::reconstructFromFile (OPENEXR_IMF_INTERNAL_NAMESPACE::IStream &is,bo
{
findTiles (is,isMultiPart,isDeep,false);
}
catch (...)
catch (...) //NOSONAR - suppress vulnerability reports from SonarCloud.
{
//
// Suppress all exceptions. This function is called only to
Expand Down
2 changes: 1 addition & 1 deletion OpenEXR/IlmImf/ImfTiledOutputFile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1071,7 +1071,7 @@ TiledOutputFile::~TiledOutputFile ()
//
_streamData->os->seekp (originalPosition);
}
catch (...)
catch (...) //NOSONAR - suppress vulnerability reports from SonarCloud.
{
//
// We cannot safely throw any exceptions from here.
Expand Down

0 comments on commit c46428a

Please sign in to comment.