From: Jay Freeman (saurik) Date: Thu, 6 Sep 2012 13:19:15 +0000 (-0700) Subject: Fix a few compilation warnings: const, %z, unused. X-Git-Tag: v1.1.0~14 X-Git-Url: https://git.saurik.com/ldid.git/commitdiff_plain/6f340f5149d1a54887a41da3a56f73170cd53641 Fix a few compilation warnings: const, %z, unused. --- diff --git a/ldid.cpp b/ldid.cpp index 48dd9db..d5c3240 100644 --- a/ldid.cpp +++ b/ldid.cpp @@ -419,7 +419,7 @@ class MachHeader : return load_commands; } - std::vector GetSegments(const char *segment_name) { + std::vector GetSegments(const char *segment_name) const { std::vector segment_commands; _foreach (load_command, GetLoadCommands()) { @@ -447,7 +447,7 @@ class MachHeader : return segment_commands; } - std::vector
GetSections(const char *segment_name, const char *section_name) { + std::vector
GetSections(const char *segment_name, const char *section_name) const { std::vector
sections; _foreach (segment, GetSegments(segment_name)) { @@ -907,7 +907,7 @@ int main(int argc, const char *argv[]) { alloc /= 16; alloc *= 16; - asprintf(&arg, "%u", alloc); + asprintf(&arg, "%zu", alloc); args.push_back(arg); } @@ -994,7 +994,6 @@ int main(int argc, const char *argv[]) { _assert(signature != NULL); uint32_t data = mach_header.Swap(signature->dataoff); - uint32_t size = mach_header.Swap(signature->datasize); uint8_t *top = reinterpret_cast(mach_header.GetBase()); uint8_t *blob = top + data; @@ -1012,7 +1011,6 @@ int main(int argc, const char *argv[]) { _assert(signature != NULL); uint32_t data = mach_header.Swap(signature->dataoff); - uint32_t size = mach_header.Swap(signature->datasize); uint8_t *top = reinterpret_cast(mach_header.GetBase()); uint8_t *blob = top + data;