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

Side by Side Diff: util/win/process_info.cc

Issue 1489293004: win: Fix some warnings reported by /analyze (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: . Created 5 years 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 | « handler/handler_main.cc ('k') | 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 2015 The Crashpad Authors. All rights reserved. 1 // Copyright 2015 The Crashpad Authors. All rights reserved.
2 // 2 //
3 // Licensed under the Apache License, Version 2.0 (the "License"); 3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License. 4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at 5 // You may obtain a copy of the License at
6 // 6 //
7 // http://www.apache.org/licenses/LICENSE-2.0 7 // http://www.apache.org/licenses/LICENSE-2.0
8 // 8 //
9 // Unless required by applicable law or agreed to in writing, software 9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS, 10 // distributed under the License is distributed on an "AS IS" BASIS,
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 217
218 return true; 218 return true;
219 } 219 }
220 220
221 template <class Traits> 221 template <class Traits>
222 bool ReadProcessData(HANDLE process, 222 bool ReadProcessData(HANDLE process,
223 WinVMAddress peb_address_vmaddr, 223 WinVMAddress peb_address_vmaddr,
224 ProcessInfo* process_info) { 224 ProcessInfo* process_info) {
225 typename Traits::Pointer peb_address; 225 typename Traits::Pointer peb_address;
226 if (!AssignIfInRange(&peb_address, peb_address_vmaddr)) { 226 if (!AssignIfInRange(&peb_address, peb_address_vmaddr)) {
227 LOG(ERROR) << base::StringPrintf("peb address 0x%x out of range", 227 LOG(ERROR) << base::StringPrintf("peb address 0x%llx out of range",
228 peb_address_vmaddr); 228 peb_address_vmaddr);
229 return false; 229 return false;
230 } 230 }
231 231
232 // Try to read the process environment block. 232 // Try to read the process environment block.
233 process_types::PEB<Traits> peb; 233 process_types::PEB<Traits> peb;
234 if (!ReadStruct(process, peb_address, &peb)) 234 if (!ReadStruct(process, peb_address, &peb))
235 return false; 235 return false;
236 236
237 process_types::RTL_USER_PROCESS_PARAMETERS<Traits> process_parameters; 237 process_types::RTL_USER_PROCESS_PARAMETERS<Traits> process_parameters;
(...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after
683 } else { 683 } else {
684 result.push_back(as_ranges[i]); 684 result.push_back(as_ranges[i]);
685 } 685 }
686 DCHECK(result.back().IsValid()); 686 DCHECK(result.back().IsValid());
687 } 687 }
688 688
689 return result; 689 return result;
690 } 690 }
691 691
692 } // namespace crashpad 692 } // namespace crashpad
OLDNEW
« no previous file with comments | « handler/handler_main.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698