diff options
author | Renato Golin <renato.golin@linaro.org> | 2014-01-21 10:24:35 +0000 |
---|---|---|
committer | Renato Golin <renato.golin@linaro.org> | 2014-01-21 10:24:35 +0000 |
commit | 6817639c74ecf7c72a033df52a1f08d037119e8f (patch) | |
tree | 71ae40b8e840251b9bdb8777c0a177b458d30374 /lib/CodeGen/StackProtector.cpp | |
parent | 2c2019b24581c93c95679068761e57e68e854d8a (diff) | |
download | llvm-6817639c74ecf7c72a033df52a1f08d037119e8f.tar.gz llvm-6817639c74ecf7c72a033df52a1f08d037119e8f.tar.bz2 llvm-6817639c74ecf7c72a033df52a1f08d037119e8f.tar.xz |
Checked return warning from coverity
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199716 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/StackProtector.cpp')
-rw-r--r-- | lib/CodeGen/StackProtector.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
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(); |