From: Dan Gohman Date: Tue, 5 Aug 2008 23:36:35 +0000 (+0000) Subject: Use strcpy instead of sprintf here. This avoids a GCC 4.3 format-string X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=1eac4e0844439219208e94a17796b8232de41a5c;p=oota-llvm.git 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54385 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp b/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp index b85f270f9e0..684d7db874c 100644 --- a/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp +++ b/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp @@ -343,7 +343,7 @@ GenericValue lle_X_sprintf(FunctionType *FT, const vector &Args) { switch (Last) { case '%': - sprintf(Buffer, FmtBuf); break; + strcpy(Buffer, "%"); break; case 'c': sprintf(Buffer, FmtBuf, uint32_t(Args[ArgNo++].IntVal.getZExtValue())); break;