From 3537c2ca7ebf31c1673b9ec2bb0c17b0406bbae0 Mon Sep 17 00:00:00 2001 From: surmeh01 Date: Fri, 18 May 2018 16:31:43 +0100 Subject: Release 18.05 --- src/armnnUtils/DotSerializer.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'src/armnnUtils/DotSerializer.cpp') 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) -- cgit v1.2.1