[llvm-commits] [llvm] r54385 - /llvm/trunk/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp
Dan Gohman
gohman at apple.com
Tue Aug 5 16:36:35 PDT 2008
Author: djg
Date: Tue Aug 5 18:36:35 2008
New Revision: 54385
URL: http://llvm.org/viewvc/llvm-project?rev=54385&view=rev
Log:
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.
Modified:
llvm/trunk/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp
Modified: llvm/trunk/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp?rev=54385&r1=54384&r2=54385&view=diff
==============================================================================
--- llvm/trunk/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp (original)
+++ llvm/trunk/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp Tue Aug 5 18:36:35 2008
@@ -343,7 +343,7 @@
switch (Last) {
case '%':
- sprintf(Buffer, FmtBuf); break;
+ strcpy(Buffer, "%"); break;
case 'c':
sprintf(Buffer, FmtBuf, uint32_t(Args[ArgNo++].IntVal.getZExtValue()));
break;
More information about the llvm-commits
mailing list