Skip to content

Commit

Permalink
Coverity: Initialize member variables.
Browse files Browse the repository at this point in the history
CID_COUNT=13
CID=102812,102838,102863,102867,102875,102891,102906,102924,102947,102964,
    103070,103246,103259
BUG=none
TEST=none
R=groby

Review URL: https://chromiumcodereview.appspot.com/9307114

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@120913 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
jhawkins@chromium.org committed Feb 8, 2012
1 parent d6cc274 commit 3c810bb
Show file tree
Hide file tree
Showing 13 changed files with 27 additions and 13 deletions.
1 change: 1 addition & 0 deletions base/debug/trace_event_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ TraceEvent::TraceEvent()
flags_(0) {
arg_names_[0] = NULL;
arg_names_[1] = NULL;
memset(arg_values_, 0, sizeof(arg_values_));
}

TraceEvent::TraceEvent(int thread_id,
Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/extensions/api/serial/serial_api.cc
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ void SerialOpenFunction::RespondOnUIThread() {
SendResponse(true);
}

SerialCloseFunction::SerialCloseFunction() {
SerialCloseFunction::SerialCloseFunction() : connection_id_(0) {
}

SerialCloseFunction::~SerialCloseFunction() {
Expand Down
5 changes: 3 additions & 2 deletions chrome/browser/geolocation/chrome_access_token_store.cc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

Expand Down Expand Up @@ -30,7 +30,8 @@ class TokenLoadingJob : public base::RefCountedThreadSafe<TokenLoadingJob> {
public:
TokenLoadingJob(
const AccessTokenStore::LoadAccessTokensCallbackType& callback)
: callback_(callback) {
: callback_(callback),
system_request_context_(NULL) {
}

void Run() {
Expand Down
1 change: 1 addition & 0 deletions chrome/browser/sessions/session_types.cc
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ using content::NavigationEntry;
TabNavigation::TabNavigation()
: transition_(content::PAGE_TRANSITION_TYPED),
type_mask_(0),
post_id_(-1),
index_(-1) {
}

Expand Down
2 changes: 2 additions & 0 deletions content/common/gpu/media/dxva_video_decode_accelerator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,8 @@ DXVAVideoDecodeAccelerator::DXVAVideoDecodeAccelerator(
renderer_process_(renderer_process),
last_input_buffer_id_(-1),
inputs_before_decode_(0) {
memset(&input_stream_info_, 0, sizeof(input_stream_info_));
memset(&output_stream_info_, 0, sizeof(output_stream_info_));
}

DXVAVideoDecodeAccelerator::~DXVAVideoDecodeAccelerator() {
Expand Down
5 changes: 3 additions & 2 deletions net/http/http_response_body_drainer.cc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

Expand All @@ -14,7 +14,8 @@
namespace net {

HttpResponseBodyDrainer::HttpResponseBodyDrainer(HttpStream* stream)
: stream_(stream),
: read_size_(0),
stream_(stream),
next_state_(STATE_NONE),
total_read_(0),
session_(NULL) {}
Expand Down
5 changes: 3 additions & 2 deletions net/proxy/proxy_script_decider.cc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

Expand Down Expand Up @@ -49,7 +49,8 @@ ProxyScriptDecider::ProxyScriptDecider(
ProxyScriptFetcher* proxy_script_fetcher,
DhcpProxyScriptFetcher* dhcp_proxy_script_fetcher,
NetLog* net_log)
: proxy_script_fetcher_(proxy_script_fetcher),
: resolver_(NULL),
proxy_script_fetcher_(proxy_script_fetcher),
dhcp_proxy_script_fetcher_(dhcp_proxy_script_fetcher),
current_pac_source_index_(0u),
pac_mandatory_(false),
Expand Down
1 change: 1 addition & 0 deletions net/spdy/buffered_spdy_framer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ BufferedSpdyFramer::BufferedSpdyFramer()
header_buffer_used_(0),
header_buffer_valid_(false),
header_stream_id_(SpdyFramer::kInvalidStream) {
memset(header_buffer_, 0, sizeof(header_buffer_));
}

BufferedSpdyFramer::~BufferedSpdyFramer() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "ppapi/native_client/src/shared/ppapi_proxy/ppp_instance_combined.h"

#include <stdlib.h>
#include <string.h>

namespace ppapi_proxy {

PPP_Instance_Combined::PPP_Instance_Combined()
: initialized_(false),
did_change_view_1_0_(NULL) {
memset(&instance_1_1_, 0, sizeof(instance_1_1_));
}

void PPP_Instance_Combined::Init1_0(const PPP_Instance_1_0* instance_if) {
Expand Down
6 changes: 4 additions & 2 deletions ppapi/native_client/src/trusted/plugin/module_ppapi.cc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2011 The Chromium Authors. All rights reserved.
* Copyright (c) 2012 The Chromium Authors. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
Expand All @@ -19,7 +19,9 @@ namespace plugin {

class ModulePpapi : public pp::Module {
public:
ModulePpapi() : pp::Module(), init_was_successful_(false) {
ModulePpapi() : pp::Module(),
init_was_successful_(false),
private_interface_(NULL) {
MODULE_PRINTF(("ModulePpapi::ModulePpapi (this=%p)\n",
static_cast<void*>(this)));
}
Expand Down
1 change: 1 addition & 0 deletions remoting/protocol/jingle_session_manager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ JingleSessionManager::JingleSessionManager(
base::MessageLoopProxy* message_loop)
: message_loop_(message_loop),
signal_strategy_(NULL),
listener_(NULL),
allow_nat_traversal_(false),
ready_(false),
http_port_allocator_(NULL),
Expand Down
3 changes: 2 additions & 1 deletion remoting/protocol/negotiating_authenticator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ scoped_ptr<Authenticator> NegotiatingAuthenticator::CreateForHost(

NegotiatingAuthenticator::NegotiatingAuthenticator(
Authenticator::State initial_state)
: current_method_(AuthenticationMethod::Invalid()),
: certificate_sent_(false),
current_method_(AuthenticationMethod::Invalid()),
state_(initial_state),
rejection_reason_(INVALID_CREDENTIALS) {
}
Expand Down
4 changes: 2 additions & 2 deletions webkit/plugins/ppapi/audio_helper.cc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

Expand All @@ -14,7 +14,7 @@ namespace ppapi {

// AudioHelper -----------------------------------------------------------------

AudioHelper::AudioHelper() {
AudioHelper::AudioHelper() : shared_memory_size_for_create_callback_(0) {
}

AudioHelper::~AudioHelper() {
Expand Down

0 comments on commit 3c810bb

Please sign in to comment.