From 56127624e7b31c1c2477b10fae207f2991eeb72c Mon Sep 17 00:00:00 2001 From: Reid Spencer Date: Wed, 29 Dec 2004 01:20:24 +0000 Subject: [PATCH] Remove potential platform portability issue with size of "int". git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19172 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Archive/ArchiveReader.cpp | 4 +++- lib/Bytecode/Archive/ArchiveReader.cpp | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/Archive/ArchiveReader.cpp b/lib/Archive/ArchiveReader.cpp index 28327df4cb0..56b42ffdb2e 100644 --- a/lib/Archive/ArchiveReader.cpp +++ b/lib/Archive/ArchiveReader.cpp @@ -190,7 +190,9 @@ Archive::parseMemberHeader(const char*& At, const char* End) { member->path.setFile(pathname); member->info.fileSize = MemberSize; member->info.modTime.fromEpochTime(atoi(Hdr->date)); - sscanf(Hdr->mode, "%o", &(member->info.mode)); + unsigned int mode; + sscanf(Hdr->mode, "%o", &mode); + member->info.mode = mode; member->info.user = atoi(Hdr->uid); member->info.group = atoi(Hdr->gid); member->flags = flags; diff --git a/lib/Bytecode/Archive/ArchiveReader.cpp b/lib/Bytecode/Archive/ArchiveReader.cpp index 28327df4cb0..56b42ffdb2e 100644 --- a/lib/Bytecode/Archive/ArchiveReader.cpp +++ b/lib/Bytecode/Archive/ArchiveReader.cpp @@ -190,7 +190,9 @@ Archive::parseMemberHeader(const char*& At, const char* End) { member->path.setFile(pathname); member->info.fileSize = MemberSize; member->info.modTime.fromEpochTime(atoi(Hdr->date)); - sscanf(Hdr->mode, "%o", &(member->info.mode)); + unsigned int mode; + sscanf(Hdr->mode, "%o", &mode); + member->info.mode = mode; member->info.user = atoi(Hdr->uid); member->info.group = atoi(Hdr->gid); member->flags = flags; -- 2.34.1