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

Side by Side Diff: handler/handler_main.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 | « no previous file | util/win/process_info.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Crashpad Authors. All rights reserved. 1 // Copyright 2014 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 321 matching lines...) Expand 10 before | Expand all | Expand 10 after
332 sigemptyset(&sa.sa_mask); 332 sigemptyset(&sa.sa_mask);
333 sa.sa_flags = SA_SIGINFO; 333 sa.sa_flags = SA_SIGINFO;
334 sa.sa_sigaction = HandleSIGTERM; 334 sa.sa_sigaction = HandleSIGTERM;
335 int rv = sigaction(SIGTERM, &sa, &old_sa); 335 int rv = sigaction(SIGTERM, &sa, &old_sa);
336 PCHECK(rv == 0) << "sigaction"; 336 PCHECK(rv == 0) << "sigaction";
337 reset_sigterm.reset(&old_sa); 337 reset_sigterm.reset(&old_sa);
338 } 338 }
339 #elif defined(OS_WIN) 339 #elif defined(OS_WIN)
340 ExceptionHandlerServer exception_handler_server(!options.pipe_name.empty()); 340 ExceptionHandlerServer exception_handler_server(!options.pipe_name.empty());
341 341
342 std::string pipe_name;
343 if (!options.pipe_name.empty()) { 342 if (!options.pipe_name.empty()) {
344 exception_handler_server.SetPipeName(base::UTF8ToUTF16(options.pipe_name)); 343 exception_handler_server.SetPipeName(base::UTF8ToUTF16(options.pipe_name));
345 } else if (options.handshake_handle != INVALID_HANDLE_VALUE) { 344 } else if (options.handshake_handle != INVALID_HANDLE_VALUE) {
346 std::wstring pipe_name = exception_handler_server.CreatePipe(); 345 std::wstring pipe_name = exception_handler_server.CreatePipe();
347 346
348 uint32_t pipe_name_length = static_cast<uint32_t>(pipe_name.size()); 347 uint32_t pipe_name_length = static_cast<uint32_t>(pipe_name.size());
349 if (!LoggingWriteFile(options.handshake_handle, 348 if (!LoggingWriteFile(options.handshake_handle,
350 &pipe_name_length, 349 &pipe_name_length,
351 sizeof(pipe_name_length))) { 350 sizeof(pipe_name_length))) {
352 return EXIT_FAILURE; 351 return EXIT_FAILURE;
(...skipping 20 matching lines...) Expand all
373 database.get(), &upload_thread, &options.annotations); 372 database.get(), &upload_thread, &options.annotations);
374 373
375 exception_handler_server.Run(&exception_handler); 374 exception_handler_server.Run(&exception_handler);
376 375
377 upload_thread.Stop(); 376 upload_thread.Stop();
378 377
379 return EXIT_SUCCESS; 378 return EXIT_SUCCESS;
380 } 379 }
381 380
382 } // namespace crashpad 381 } // namespace crashpad
OLDNEW
« no previous file with comments | « no previous file | util/win/process_info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698