diff options
author | surmeh01 <surabhi.mehta@arm.com> | 2018-05-18 16:31:43 +0100 |
---|---|---|
committer | telsoa01 <telmo.soares@arm.com> | 2018-05-23 13:09:07 +0100 |
commit | 3537c2ca7ebf31c1673b9ec2bb0c17b0406bbae0 (patch) | |
tree | 5950603ad78ec3fe56fb31ddc7f4d52a19f5bc60 /src/armnnUtils/DotSerializer.cpp | |
parent | bceff2fb3fc68bb0aa88b886900c34b77340c826 (diff) | |
download | armnn-3537c2ca7ebf31c1673b9ec2bb0c17b0406bbae0.tar.gz |
Release 18.05
Diffstat (limited to 'src/armnnUtils/DotSerializer.cpp')
-rw-r--r-- | src/armnnUtils/DotSerializer.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/armnnUtils/DotSerializer.cpp b/src/armnnUtils/DotSerializer.cpp index 1feea54dbd..3a9df42fbc 100644 --- a/src/armnnUtils/DotSerializer.cpp +++ b/src/armnnUtils/DotSerializer.cpp @@ -69,7 +69,7 @@ DotAttributeSet::DotAttributeSet(std::ostream& stream) DotAttributeSet::~DotAttributeSet() { bool doSpace=false; - for (auto attrib : m_Attributes) + for (auto&& attrib : m_Attributes) { if (doSpace) { @@ -155,7 +155,16 @@ NodeContent::~NodeContent() ss << "\\l"; } ss << "}\""; - GetStream() << ss.str(); + + std::string s; + try + { + // Coverity fix: std::stringstream::str() may throw an exception of type std::length_error. + s = ss.str(); + } + catch (const std::exception&) { } // Swallow any exception. + + GetStream() << s; } DotNode::DotNode(std::ostream& stream, unsigned int nodeId, const char* label) |