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

Side by Side Diff: base/debug/trace_event_impl.cc

Issue 9307114: Coverity: Initialize member variables. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Build fix. Created 8 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/extensions/api/serial/serial_api.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/debug/trace_event_impl.h" 5 #include "base/debug/trace_event_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 140
141 TraceEvent::TraceEvent() 141 TraceEvent::TraceEvent()
142 : id_(0u), 142 : id_(0u),
143 category_enabled_(NULL), 143 category_enabled_(NULL),
144 name_(NULL), 144 name_(NULL),
145 thread_id_(0), 145 thread_id_(0),
146 phase_(TRACE_EVENT_PHASE_BEGIN), 146 phase_(TRACE_EVENT_PHASE_BEGIN),
147 flags_(0) { 147 flags_(0) {
148 arg_names_[0] = NULL; 148 arg_names_[0] = NULL;
149 arg_names_[1] = NULL; 149 arg_names_[1] = NULL;
150 memset(arg_values_, 0, sizeof(arg_values_));
150 } 151 }
151 152
152 TraceEvent::TraceEvent(int thread_id, 153 TraceEvent::TraceEvent(int thread_id,
153 TimeTicks timestamp, 154 TimeTicks timestamp,
154 char phase, 155 char phase,
155 const unsigned char* category_enabled, 156 const unsigned char* category_enabled,
156 const char* name, 157 const char* name,
157 unsigned long long id, 158 unsigned long long id,
158 int num_args, 159 int num_args,
159 const char** arg_names, 160 const char** arg_names,
(...skipping 554 matching lines...) Expand 10 before | Expand all | Expand 10 after
714 // Create a FNV hash from the process ID for XORing. 715 // Create a FNV hash from the process ID for XORing.
715 // See http://isthe.com/chongo/tech/comp/fnv/ for algorithm details. 716 // See http://isthe.com/chongo/tech/comp/fnv/ for algorithm details.
716 unsigned long long offset_basis = 14695981039346656037ull; 717 unsigned long long offset_basis = 14695981039346656037ull;
717 unsigned long long fnv_prime = 1099511628211ull; 718 unsigned long long fnv_prime = 1099511628211ull;
718 unsigned long long pid = static_cast<unsigned long long>(process_id_); 719 unsigned long long pid = static_cast<unsigned long long>(process_id_);
719 process_id_hash_ = (offset_basis ^ pid) * fnv_prime; 720 process_id_hash_ = (offset_basis ^ pid) * fnv_prime;
720 } 721 }
721 722
722 } // namespace debug 723 } // namespace debug
723 } // namespace base 724 } // namespace base
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/api/serial/serial_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698