mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-26 05:25:47 +00:00
Squelch warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8729 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -63,7 +63,7 @@ int execve(const char *filename, char *const argv[], char *const envp[])
|
|||||||
/* Read the header from the file */
|
/* Read the header from the file */
|
||||||
ssize_t bytesRead = read(file, header, headerSize);
|
ssize_t bytesRead = read(file, header, headerSize);
|
||||||
close(file);
|
close(file);
|
||||||
if (bytesRead != headerSize) return EIO;
|
if (bytesRead != (ssize_t)headerSize) return EIO;
|
||||||
if (!memcmp(llvmHeader, header, headerSize)) {
|
if (!memcmp(llvmHeader, header, headerSize)) {
|
||||||
/*
|
/*
|
||||||
* This is a bytecode file, so execute the JIT with the program and
|
* This is a bytecode file, so execute the JIT with the program and
|
||||||
|
@@ -42,7 +42,7 @@ unsigned isExecutableFile(const char *ExeFileName) {
|
|||||||
char *FindExecutable(const char *ExeName) {
|
char *FindExecutable(const char *ExeName) {
|
||||||
/* Try to find the executable in the path */
|
/* Try to find the executable in the path */
|
||||||
const char *PathStr = getenv("PATH");
|
const char *PathStr = getenv("PATH");
|
||||||
if (PathStr == 0) return "";
|
if (PathStr == 0) return 0;
|
||||||
|
|
||||||
/* Now we have a colon separated list of directories to search, try them. */
|
/* Now we have a colon separated list of directories to search, try them. */
|
||||||
unsigned PathLen = strlen(PathStr);
|
unsigned PathLen = strlen(PathStr);
|
||||||
@@ -51,7 +51,7 @@ char *FindExecutable(const char *ExeName) {
|
|||||||
const char *Colon = strchr(PathStr, ':');
|
const char *Colon = strchr(PathStr, ':');
|
||||||
|
|
||||||
/* Check to see if this first directory contains the executable... */
|
/* Check to see if this first directory contains the executable... */
|
||||||
unsigned DirLen = Colon ? (Colon-PathStr) : strlen(PathStr);
|
unsigned DirLen = Colon ? (unsigned)(Colon-PathStr) : strlen(PathStr);
|
||||||
char *FilePath = alloca(sizeof(char) * (DirLen+1+strlen(ExeName)+1));
|
char *FilePath = alloca(sizeof(char) * (DirLen+1+strlen(ExeName)+1));
|
||||||
unsigned i, e;
|
unsigned i, e;
|
||||||
for (i = 0; i != DirLen; ++i)
|
for (i = 0; i != DirLen; ++i)
|
||||||
|
Reference in New Issue
Block a user