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

Side by Side Diff: src/processor/range_map-inl.h

Issue 1591793002: breakpad: fix unittest failure when building with clang. (Closed) Base URL: https://chromium.googlesource.com/breakpad/breakpad.git@master
Patch Set: Created 4 years, 11 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 #include "processor/logging.h" 43 #include "processor/logging.h"
44 44
45 45
46 namespace google_breakpad { 46 namespace google_breakpad {
47 47
48 48
49 template<typename AddressType, typename EntryType> 49 template<typename AddressType, typename EntryType>
50 bool RangeMap<AddressType, EntryType>::StoreRange(const AddressType &base, 50 bool RangeMap<AddressType, EntryType>::StoreRange(const AddressType &base,
51 const AddressType &size, 51 const AddressType &size,
52 const EntryType &entry) { 52 const EntryType &entry) {
53 AddressType high = base + size - 1; 53 AddressType high = base + (size - 1);
54 54
55 // Check for undersize or overflow. 55 // Check for undersize or overflow.
56 if (size <= 0 || high < base) { 56 if (size <= 0 || high < base) {
57 // The processor will hit this case too frequently with common symbol 57 // The processor will hit this case too frequently with common symbol
58 // files in the size == 0 case, which is more suited to a DEBUG channel. 58 // files in the size == 0 case, which is more suited to a DEBUG channel.
59 // Filter those out since there's no DEBUG channel at the moment. 59 // Filter those out since there's no DEBUG channel at the moment.
60 BPLOG_IF(INFO, size != 0) << "StoreRange failed, " << HexString(base) << 60 BPLOG_IF(INFO, size != 0) << "StoreRange failed, " << HexString(base) <<
61 "+" << HexString(size) << ", " << 61 "+" << HexString(size) << ", " <<
62 HexString(high); 62 HexString(high);
63 return false; 63 return false;
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 template<typename AddressType, typename EntryType> 211 template<typename AddressType, typename EntryType>
212 void RangeMap<AddressType, EntryType>::Clear() { 212 void RangeMap<AddressType, EntryType>::Clear() {
213 map_.clear(); 213 map_.clear();
214 } 214 }
215 215
216 216
217 } // namespace google_breakpad 217 } // namespace google_breakpad
218 218
219 219
220 #endif // PROCESSOR_RANGE_MAP_INL_H__ 220 #endif // PROCESSOR_RANGE_MAP_INL_H__
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