From 00ce84066f82a75b18172f3cb1d2a1bb5c3d9ff4 Mon Sep 17 00:00:00 2001 From: Misha Brukman Date: Sat, 27 Sep 2003 22:26:37 +0000 Subject: [PATCH] Squelch warnings. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8729 91177308-0d34-0410-b5e6-96231b3b80d8 --- tools/llee/ExecveHandler.c | 2 +- tools/llee/SysUtils.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/llee/ExecveHandler.c b/tools/llee/ExecveHandler.c index 91f909225b1..dba419cfa31 100644 --- a/tools/llee/ExecveHandler.c +++ b/tools/llee/ExecveHandler.c @@ -63,7 +63,7 @@ int execve(const char *filename, char *const argv[], char *const envp[]) /* Read the header from the file */ ssize_t bytesRead = read(file, header, headerSize); close(file); - if (bytesRead != headerSize) return EIO; + if (bytesRead != (ssize_t)headerSize) return EIO; if (!memcmp(llvmHeader, header, headerSize)) { /* * This is a bytecode file, so execute the JIT with the program and diff --git a/tools/llee/SysUtils.c b/tools/llee/SysUtils.c index 90d6bb12901..8399612446e 100644 --- a/tools/llee/SysUtils.c +++ b/tools/llee/SysUtils.c @@ -42,7 +42,7 @@ unsigned isExecutableFile(const char *ExeFileName) { char *FindExecutable(const char *ExeName) { /* Try to find the executable in the 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. */ unsigned PathLen = strlen(PathStr); @@ -51,7 +51,7 @@ char *FindExecutable(const char *ExeName) { const char *Colon = strchr(PathStr, ':'); /* 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)); unsigned i, e; for (i = 0; i != DirLen; ++i)