mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-20 10:24:12 +00:00
Fix more -Wshorten-64-to-32 warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50659 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -124,7 +124,8 @@ Path::isDynamicLibrary() const {
|
||||
if (canRead()) {
|
||||
std::string Magic;
|
||||
if (getMagicNumber(Magic, 64))
|
||||
switch (IdentifyFileType(Magic.c_str(), Magic.length())) {
|
||||
switch (IdentifyFileType(Magic.c_str(),
|
||||
static_cast<unsigned>(Magic.length()))) {
|
||||
default: return false;
|
||||
case Mach_O_FixedVirtualMemorySharedLib_FileType:
|
||||
case Mach_O_DynamicallyLinkedSharedLib_FileType:
|
||||
@ -167,7 +168,7 @@ Path::isBitcodeFile() const {
|
||||
|
||||
bool Path::hasMagicNumber(const std::string &Magic) const {
|
||||
std::string actualMagic;
|
||||
if (getMagicNumber(actualMagic, Magic.size()))
|
||||
if (getMagicNumber(actualMagic, static_cast<unsigned>(Magic.size())))
|
||||
return Magic == actualMagic;
|
||||
return false;
|
||||
}
|
||||
@ -204,7 +205,7 @@ static std::string getDirnameCharSep(const std::string& path, char Sep) {
|
||||
// If the path is all slashes, return a single slash.
|
||||
// Otherwise, remove all trailing slashes.
|
||||
|
||||
signed pos = path.size() - 1;
|
||||
signed pos = static_cast<signed>(path.size()) - 1;
|
||||
|
||||
while (pos >= 0 && path[pos] == Sep)
|
||||
--pos;
|
||||
|
Reference in New Issue
Block a user