Skip to content

Commit

Permalink
Coverity: Initialize member variables.
Browse files Browse the repository at this point in the history
CID_COUNT=12
CID=104349,104361,104373,104374,104399,104420,104421,104422,104466,104476,
    104532,104538
BUG=none
TEST=none
R=groby
TBR=brettw,satorux,mnissler

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@148430 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
jhawkins@chromium.org committed Jul 25, 2012
1 parent 1629eee commit f1a9c52
Show file tree
Hide file tree
Showing 11 changed files with 23 additions and 8 deletions.
2 changes: 1 addition & 1 deletion chrome/browser/policy/url_blacklist_manager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ scoped_ptr<URLBlacklist> BuildBlacklist(scoped_ptr<base::ListValue> block,
} // namespace

struct URLBlacklist::FilterComponents {
FilterComponents() : match_subdomains(true), allow(true) {}
FilterComponents() : port(0), match_subdomains(true), allow(true) {}
~FilterComponents() {}

std::string scheme;
Expand Down
2 changes: 2 additions & 0 deletions content/browser/gamepad/platform_data_fetcher_win.cc
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,8 @@ void GamepadPlatformDataFetcherWin::GetGamepadData(WebGamepads* pads,
}

bool GamepadPlatformDataFetcherWin::GetXinputDllFunctions() {
xinput_get_capabilities_ = NULL;
xinput_get_state_ = NULL;
xinput_enable_ = static_cast<XInputEnableFunc>(
xinput_dll_.GetFunctionPointer("XInputEnable"));
if (!xinput_enable_)
Expand Down
6 changes: 6 additions & 0 deletions content/common/gpu/media/vaapi_h264_decoder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -242,11 +242,13 @@ VaapiH264Decoder::DecodeSurface::DecodeSurface(
va_display_(va_display),
make_context_current_(make_context_current),
va_surface_id_(va_surface_id),
input_id_(0),
picture_buffer_id_(picture_buffer_id),
texture_id_(texture_id),
width_(width),
height_(height),
available_(false),
poc_(0),
x_pixmap_(0),
glx_pixmap_(0) {
// Bind the surface to a texture of the given width and height,
Expand Down Expand Up @@ -332,6 +334,10 @@ bool VaapiH264Decoder::DecodeSurface::Sync() {

VaapiH264Decoder::VaapiH264Decoder() {
Reset();
curr_input_id_ = -1;
x_display_ = NULL;
fb_config_ = NULL;
va_display_ = NULL;
curr_sps_id_ = -1;
curr_pps_id_ = -1;
pic_width_ = -1;
Expand Down
2 changes: 1 addition & 1 deletion content/common/gpu/media/vaapi_h264_decoder.h
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ class VaapiH264Decoder {
int pic_width_;
int pic_height_;

// Data queued up for HW decoder, to be commited on next HW decode.
// Data queued up for HW decoder, to be committed on next HW decode.
std::queue<VABufferID> pending_slice_bufs_;
std::queue<VABufferID> pending_va_bufs_;

Expand Down
2 changes: 1 addition & 1 deletion content/common/gpu/media/vaapi_video_decode_accelerator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

using content::VaapiH264Decoder;

VaapiVideoDecodeAccelerator::InputBuffer::InputBuffer() {
VaapiVideoDecodeAccelerator::InputBuffer::InputBuffer() : id(0), size(0) {
}

VaapiVideoDecodeAccelerator::InputBuffer::~InputBuffer() {
Expand Down
2 changes: 1 addition & 1 deletion dbus/property.cc
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ void Property<uint32>::AppendSetValueToWriter(MessageWriter* writer) {
//

template <>
Property<int64>::Property() : value_(0) {
Property<int64>::Property() : value_(0), set_value_(0) {
}

template <>
Expand Down
7 changes: 5 additions & 2 deletions gpu/command_buffer/service/program_manager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,10 @@ bool GetUniformNameSansElement(
} // anonymous namespace.

ProgramManager::ProgramInfo::UniformInfo::UniformInfo()
: size(0) {
: size(0),
type(GL_NONE),
fake_location_base(0),
is_array(false) {
}

ProgramManager::ProgramInfo::UniformInfo::UniformInfo(
Expand Down Expand Up @@ -233,7 +236,7 @@ void ProgramManager::ProgramInfo::ClearUniforms(
namespace {

struct UniformData {
UniformData() : size(-1), type(GL_NONE), added(false) {
UniformData() : size(-1), type(GL_NONE), location(0), added(false) {
}
std::string queried_name;
std::string corrected_name;
Expand Down
1 change: 1 addition & 0 deletions media/base/audio_renderer_mixer_input.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ AudioRendererMixerInput::AudioRendererMixerInput(
volume_(1.0f),
get_mixer_cb_(get_mixer_cb),
remove_mixer_cb_(remove_mixer_cb),
mixer_(NULL),
callback_(NULL) {
}

Expand Down
1 change: 1 addition & 0 deletions remoting/client/plugin/pepper_view.cc
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ PepperView::PepperView(ChromotingInstance* instance,
view_size_dips_(SkISize::Make(0, 0)),
view_scale_(1.0f),
flush_pending_(false),
is_initialized_(false),
frame_received_(false) {
InitiateDrawing();
}
Expand Down
3 changes: 2 additions & 1 deletion webkit/dom_storage/dom_storage_session.cc
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ DomStorageSession::DomStorageSession(DomStorageContext* context,
const std::string& persistent_namespace_id)
: context_(context),
namespace_id_(namespace_id),
persistent_namespace_id_(persistent_namespace_id) {
persistent_namespace_id_(persistent_namespace_id),
should_persist_(false) {
// This ctor is intended for use by the Clone() method.
}

Expand Down
3 changes: 2 additions & 1 deletion webkit/fileapi/obfuscated_file_util.cc
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,8 @@ class ObfuscatedFileEnumerator
obfuscated_file_util_(obfuscated_file_util),
origin_(root_url.origin()),
type_(root_url.type()),
recursive_(recursive) {
recursive_(recursive),
current_file_id_(0) {
FilePath root_virtual_path = root_url.path();
FileId file_id;

Expand Down

0 comments on commit f1a9c52

Please sign in to comment.