mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-05 13:26:55 +00:00
Fix some warnings reported by gcc-4.3. Hopefully
this still compiles on windows - I can't test! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52488 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -38,7 +38,6 @@
|
||||
int main(int argc, char** argv) {
|
||||
const char *Interp = getenv("LLVMINTERP");
|
||||
const char **Args;
|
||||
int len;
|
||||
if (Interp == 0) Interp = "lli";
|
||||
|
||||
/* Set up the command line options to pass to the JIT. */
|
||||
@@ -47,12 +46,14 @@ int main(int argc, char** argv) {
|
||||
Args[0] = Interp;
|
||||
|
||||
#ifdef LLVM_ON_WIN32
|
||||
len = strlen(argv[0]);
|
||||
if (len < 4 || strcmp(argv[0] + len - 4, ".exe") != 0) {
|
||||
/* .exe suffix is stripped off of argv[0] if the executable was run on the
|
||||
* command line without one. Put it back on.
|
||||
*/
|
||||
argv[0] = strcat(strcpy((char*)malloc(len + 5), argv[0]), ".exe");
|
||||
{
|
||||
int len = strlen(argv[0]);
|
||||
if (len < 4 || strcmp(argv[0] + len - 4, ".exe") != 0) {
|
||||
/* .exe suffix is stripped off of argv[0] if the executable was run on the
|
||||
* command line without one. Put it back on.
|
||||
*/
|
||||
argv[0] = strcat(strcpy((char*)malloc(len + 5), argv[0]), ".exe");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
Reference in New Issue
Block a user