From: Renato Golin Date: Tue, 21 Jan 2014 10:24:35 +0000 (+0000) Subject: Checked return warning from coverity X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=6817639c74ecf7c72a033df52a1f08d037119e8f;p=oota-llvm.git Checked return warning from coverity git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199716 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/StackProtector.cpp b/lib/CodeGen/StackProtector.cpp index f2925ef7712..349b733418e 100644 --- a/lib/CodeGen/StackProtector.cpp +++ b/lib/CodeGen/StackProtector.cpp @@ -91,8 +91,9 @@ bool StackProtector::runOnFunction(Function &Fn) { Attribute Attr = Fn.getAttributes().getAttribute( AttributeSet::FunctionIndex, "stack-protector-buffer-size"); - if (Attr.isStringAttribute()) - Attr.getValueAsString().getAsInteger(10, SSPBufferSize); + if (Attr.isStringAttribute() && + Attr.getValueAsString().getAsInteger(10, SSPBufferSize)) + return false; // Invalid integer string ++NumFunProtected; return InsertStackProtectors();