Skip to content

Commit

Permalink
Coverity: Initialize member variables.
Browse files Browse the repository at this point in the history
CID_COUNT=7
CID=13432,14429,16922,101542,101734,102304,102305
BUG=none
TEST=none
R=tbreisacher
TBR=jam@chromium.org,tommi@chromium.org,ben@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@148592 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
jhawkins@chromium.org committed Jul 26, 2012
1 parent 9082959 commit c23654e
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 7 deletions.
10 changes: 8 additions & 2 deletions courgette/disassembler_elf_32_x86.cc
@@ -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 @@ -18,7 +18,13 @@
namespace courgette {

DisassemblerElf32X86::DisassemblerElf32X86(const void* start, size_t length)
: Disassembler(start, length) {
: Disassembler(start, length),
header_(NULL),
section_header_table_(NULL),
section_header_table_size_(0),
program_header_table_(NULL),
program_header_table_size_(0),
default_string_section_(NULL) {
}

bool DisassemblerElf32X86::ParseHeader() {
Expand Down
6 changes: 4 additions & 2 deletions courgette/patcher_x86_32.h
@@ -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 @@ -17,7 +17,9 @@ namespace courgette {
class PatcherX86_32 : public TransformationPatcher {
public:
explicit PatcherX86_32(const Region& region)
: ensemble_region_(region) {
: ensemble_region_(region),
base_offset_(0),
base_length_(0) {
}

Status Init(SourceStream* parameter_stream) {
Expand Down
2 changes: 2 additions & 0 deletions ppapi/native_client/src/trusted/plugin/file_downloader.h
Expand Up @@ -49,6 +49,8 @@ class FileDownloader {
file_io_trusted_interface_(NULL),
url_loader_trusted_interface_(NULL),
open_time_(-1),
mode_(DOWNLOAD_TO_FILE),
url_scheme_(SCHEME_OTHER),
data_stream_callback_source_(NULL) {}
~FileDownloader() {}

Expand Down
2 changes: 1 addition & 1 deletion ui/base/dragdrop/os_exchange_data_provider_win.cc
Expand Up @@ -75,7 +75,7 @@ class FormatEtcEnumerator : public IEnumFORMATETC {
private:
// This can only be called from |CloneFromOther|, since it initializes the
// contents_ from the other enumerator's contents.
FormatEtcEnumerator() : ref_count_(0) {
FormatEtcEnumerator() : cursor_(0), ref_count_(0) {
}

// Clone a new FormatEtc from another instance of this enumeration.
Expand Down
5 changes: 4 additions & 1 deletion ui/gfx/render_text_win.cc
Expand Up @@ -241,7 +241,10 @@ bool IsUnicodeBidiControlCharacter(char16 c) {
namespace internal {

TextRun::TextRun()
: strike(false),
: foreground(0),
font_style(0),
strike(false),
diagonal_strike(false),
underline(false),
width(0),
preceding_run_widths(0),
Expand Down
2 changes: 1 addition & 1 deletion ui/views/controls/native_control_win.cc
Expand Up @@ -24,7 +24,7 @@ namespace views {
////////////////////////////////////////////////////////////////////////////////
// NativeControlWin, public:

NativeControlWin::NativeControlWin() {
NativeControlWin::NativeControlWin() : original_wndproc_(NULL) {
}

NativeControlWin::~NativeControlWin() {
Expand Down
2 changes: 2 additions & 0 deletions webkit/plugins/npapi/webplugin_ime_win.cc
Expand Up @@ -4,6 +4,7 @@

#include "webkit/plugins/npapi/webplugin_ime_win.h"

#include <cstring>
#include <string>
#include <vector>

Expand Down Expand Up @@ -33,6 +34,7 @@ WebPluginIMEWin::WebPluginIMEWin()
support_ime_messages_(false),
status_updated_(false),
input_type_(1) {
memset(result_clauses_, 0, sizeof(result_clauses_));
}

WebPluginIMEWin::~WebPluginIMEWin() {
Expand Down

0 comments on commit c23654e

Please sign in to comment.