summaryrefslogtreecommitdiffstats
path: root/llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2008-08-05 23:36:35 +0000
committerDan Gohman <gohman@apple.com>2008-08-05 23:36:35 +0000
commitced4857365d59115546fee01f3174a2ced415726 (patch)
treea903c395615409acaa75e99bc39ddf2da66f0813 /llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp
parentbc6786e7eeab7e55d5cf032ee9854d8877ee922d (diff)
downloadbcm5719-llvm-ced4857365d59115546fee01f3174a2ced415726.tar.gz
bcm5719-llvm-ced4857365d59115546fee01f3174a2ced415726.zip
Use strcpy instead of sprintf here. This avoids a GCC 4.3 format-string
warning. There wasn't actually a problem here, because the contents of the string are known. llvm-svn: 54385
Diffstat (limited to 'llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp')
-rw-r--r--llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp b/llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp
index b85f270f9e0..684d7db874c 100644
--- a/llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp
+++ b/llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp
@@ -343,7 +343,7 @@ GenericValue lle_X_sprintf(FunctionType *FT, const vector<GenericValue> &Args) {
switch (Last) {
case '%':
- sprintf(Buffer, FmtBuf); break;
+ strcpy(Buffer, "%"); break;
case 'c':
sprintf(Buffer, FmtBuf, uint32_t(Args[ArgNo++].IntVal.getZExtValue()));
break;
OpenPOWER on IntegriCloud