From 6817639c74ecf7c72a033df52a1f08d037119e8f Mon Sep 17 00:00:00 2001 From: Renato Golin Date: Tue, 21 Jan 2014 10:24:35 +0000 Subject: Checked return warning from coverity git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199716 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/StackProtector.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib/CodeGen/StackProtector.cpp') diff --git a/lib/CodeGen/StackProtector.cpp b/lib/CodeGen/StackProtector.cpp index f2925ef771..349b733418 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(); -- cgit v1.2.3