Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(155)

Side by Side Diff: src/common/mac/macho_reader.cc

Issue 1951603002: macho: fix printf type mismatches (Closed) Base URL: https://chromium.googlesource.com/breakpad/breakpad.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010, Google Inc. 1 // Copyright (c) 2010, Google Inc.
2 // All rights reserved. 2 // All rights reserved.
3 // 3 //
4 // Redistribution and use in source and binary forms, with or without 4 // Redistribution and use in source and binary forms, with or without
5 // modification, are permitted provided that the following conditions are 5 // modification, are permitted provided that the following conditions are
6 // met: 6 // met:
7 // 7 //
8 // * Redistributions of source code must retain the above copyright 8 // * Redistributions of source code must retain the above copyright
9 // notice, this list of conditions and the following disclaimer. 9 // notice, this list of conditions and the following disclaimer.
10 // * Redistributions in binary form must reproduce the above 10 // * Redistributions in binary form must reproduce the above
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 filename_.c_str()); 174 filename_.c_str());
175 } 175 }
176 176
177 void Reader::Reporter::LoadCommandRegionTruncated() { 177 void Reader::Reporter::LoadCommandRegionTruncated() {
178 fprintf(stderr, "%s: file too short to hold load command region" 178 fprintf(stderr, "%s: file too short to hold load command region"
179 " given in Mach-O header\n", filename_.c_str()); 179 " given in Mach-O header\n", filename_.c_str());
180 } 180 }
181 181
182 void Reader::Reporter::LoadCommandsOverrun(size_t claimed, size_t i, 182 void Reader::Reporter::LoadCommandsOverrun(size_t claimed, size_t i,
183 LoadCommandType type) { 183 LoadCommandType type) {
184 fprintf(stderr, "%s: file's header claims there are %ld" 184 fprintf(stderr, "%s: file's header claims there are %zu"
185 " load commands, but load command #%ld", 185 " load commands, but load command #%zu",
186 filename_.c_str(), claimed, i); 186 filename_.c_str(), claimed, i);
187 if (type) fprintf(stderr, ", of type %d,", type); 187 if (type) fprintf(stderr, ", of type %d,", type);
188 fprintf(stderr, " extends beyond the end of the load command region\n"); 188 fprintf(stderr, " extends beyond the end of the load command region\n");
189 } 189 }
190 190
191 void Reader::Reporter::LoadCommandTooShort(size_t i, LoadCommandType type) { 191 void Reader::Reporter::LoadCommandTooShort(size_t i, LoadCommandType type) {
192 fprintf(stderr, "%s: the contents of load command #%ld, of type %d," 192 fprintf(stderr, "%s: the contents of load command #%zu, of type %d,"
193 " extend beyond the size given in the load command's header\n", 193 " extend beyond the size given in the load command's header\n",
194 filename_.c_str(), i, type); 194 filename_.c_str(), i, type);
195 } 195 }
196 196
197 void Reader::Reporter::SectionsMissing(const string &name) { 197 void Reader::Reporter::SectionsMissing(const string &name) {
198 fprintf(stderr, "%s: the load command for segment '%s'" 198 fprintf(stderr, "%s: the load command for segment '%s'"
199 " is too short to hold the section headers it claims to have\n", 199 " is too short to hold the section headers it claims to have\n",
200 filename_.c_str(), name.c_str()); 200 filename_.c_str(), name.c_str());
201 } 201 }
202 202
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
530 530
531 bool Reader::MapSegmentSections(const Segment &segment, 531 bool Reader::MapSegmentSections(const Segment &segment,
532 SectionMap *section_map) const { 532 SectionMap *section_map) const {
533 section_map->clear(); 533 section_map->clear();
534 SectionMapper mapper(section_map); 534 SectionMapper mapper(section_map);
535 return WalkSegmentSections(segment, &mapper); 535 return WalkSegmentSections(segment, &mapper);
536 } 536 }
537 537
538 } // namespace mach_o 538 } // namespace mach_o
539 } // namespace google_breakpad 539 } // namespace google_breakpad
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698