mirror of
https://github.com/RPCS3/llvm.git
synced 2024-11-24 12:20:00 +00:00
Mark checkSignature const, and in turn stop casting away const from
ArchiveMemberHeader. Found by gcc48 -Wcast-qual. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163255 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
141e99745a
commit
651e800def
@ -66,7 +66,7 @@ namespace llvm {
|
||||
fmag[1] = '\n';
|
||||
}
|
||||
|
||||
bool checkSignature() {
|
||||
bool checkSignature() const {
|
||||
return 0 == memcmp(fmag, ARFILE_MEMBER_MAGIC,2);
|
||||
}
|
||||
};
|
||||
|
@ -79,7 +79,7 @@ Archive::parseMemberHeader(const char*& At, const char* End, std::string* error)
|
||||
}
|
||||
|
||||
// Cast archive member header
|
||||
ArchiveMemberHeader* Hdr = (ArchiveMemberHeader*)At;
|
||||
const ArchiveMemberHeader* Hdr = (const ArchiveMemberHeader*)At;
|
||||
At += sizeof(ArchiveMemberHeader);
|
||||
|
||||
int flags = 0;
|
||||
@ -196,7 +196,7 @@ Archive::parseMemberHeader(const char*& At, const char* End, std::string* error)
|
||||
/* FALL THROUGH */
|
||||
|
||||
default:
|
||||
char* slash = (char*) memchr(Hdr->name, '/', 16);
|
||||
const char* slash = (const char*) memchr(Hdr->name, '/', 16);
|
||||
if (slash == 0)
|
||||
slash = Hdr->name + 16;
|
||||
pathname.assign(Hdr->name, slash - Hdr->name);
|
||||
|
Loading…
Reference in New Issue
Block a user