From 6f340f5149d1a54887a41da3a56f73170cd53641 Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Thu, 6 Sep 2012 06:19:15 -0700 Subject: [PATCH] Fix a few compilation warnings: const, %z, unused. --- ldid.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) 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; -- 2.47.2