mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-29 22:30:33 +00:00
Mark checkSignature const, and in turn stop casting away const from
ArchiveMemberHeader. Found by gcc48 -Wcast-qual. llvm-svn: 163255
This commit is contained in:
parent
4906050a4d
commit
84d5745fdc
@ -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