diff options
author | jhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-12-21 22:49:54 +0000 |
---|---|---|
committer | jhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-12-21 22:49:54 +0000 |
commit | 632197304ce0bb8fa5cd8931fe90c3c19cdeeab8 (patch) | |
tree | 632664c02fa3f4f5ddc07e9cd0890e6aae2fa26b | |
parent | b2cb730f4b30aceab3039003968ce5c8450b58a1 (diff) | |
download | chromium_src-632197304ce0bb8fa5cd8931fe90c3c19cdeeab8.zip chromium_src-632197304ce0bb8fa5cd8931fe90c3c19cdeeab8.tar.gz chromium_src-632197304ce0bb8fa5cd8931fe90c3c19cdeeab8.tar.bz2 |
Coverity: Initialize member variables.
CID=100358,100392,100393,101544,101545,101778,102025,102052,102053,102320,
102347,102394
BUG=none
TEST=none
R=gbillock
Review URL: http://codereview.chromium.org/9006026
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@115434 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | net/base/file_stream_posix.cc | 1 | ||||
-rw-r--r-- | net/http/http_auth_handler_negotiate.cc | 1 | ||||
-rw-r--r-- | net/http/http_pipelined_connection_impl.cc | 5 | ||||
-rw-r--r-- | ppapi/native_client/src/shared/ppapi_proxy/plugin_ppb_image_data.cc | 4 | ||||
-rw-r--r-- | webkit/fileapi/file_system_file_util_proxy.cc | 2 | ||||
-rw-r--r-- | webkit/fileapi/file_system_operation.cc | 9 | ||||
-rw-r--r-- | webkit/fileapi/local_file_util.cc | 3 | ||||
-rw-r--r-- | webkit/fileapi/native_file_util.cc | 3 | ||||
-rw-r--r-- | webkit/quota/quota_database.cc | 12 |
9 files changed, 32 insertions, 8 deletions
diff --git a/net/base/file_stream_posix.cc b/net/base/file_stream_posix.cc index fd2af5b..50b1593 100644 --- a/net/base/file_stream_posix.cc +++ b/net/base/file_stream_posix.cc @@ -184,6 +184,7 @@ class FileStream::AsyncContext { FileStream::AsyncContext::AsyncContext() : message_loop_(MessageLoopForIO::current()), background_io_completed_(true, false), + message_loop_task_(NULL), is_closing_(false), record_uma_(false) {} diff --git a/net/http/http_auth_handler_negotiate.cc b/net/http/http_auth_handler_negotiate.cc index cfab741..f2e8044 100644 --- a/net/http/http_auth_handler_negotiate.cc +++ b/net/http/http_auth_handler_negotiate.cc @@ -22,6 +22,7 @@ namespace net { HttpAuthHandlerNegotiate::Factory::Factory() : disable_cname_lookup_(false), use_port_(false), + resolver_(NULL), #if defined(OS_WIN) max_token_length_(0), first_creation_(true), diff --git a/net/http/http_pipelined_connection_impl.cc b/net/http/http_pipelined_connection_impl.cc index ab7ee40..faea0760 100644 --- a/net/http/http_pipelined_connection_impl.cc +++ b/net/http/http_pipelined_connection_impl.cc @@ -802,7 +802,10 @@ SSLClientSocket::NextProto HttpPipelinedConnectionImpl::protocol_negotiated() return protocol_negotiated_; } -HttpPipelinedConnectionImpl::PendingSendRequest::PendingSendRequest() { +HttpPipelinedConnectionImpl::PendingSendRequest::PendingSendRequest() + : pipeline_id(0), + request_body(NULL), + response(NULL) { } HttpPipelinedConnectionImpl::PendingSendRequest::~PendingSendRequest() { diff --git a/ppapi/native_client/src/shared/ppapi_proxy/plugin_ppb_image_data.cc b/ppapi/native_client/src/shared/ppapi_proxy/plugin_ppb_image_data.cc index 9c2a27a..1387ac2 100644 --- a/ppapi/native_client/src/shared/ppapi_proxy/plugin_ppb_image_data.cc +++ b/ppapi/native_client/src/shared/ppapi_proxy/plugin_ppb_image_data.cc @@ -136,8 +136,10 @@ const PPB_ImageData* PluginImageData::GetInterface() { } PluginImageData::PluginImageData() - : shm_size_(0), + : shm_fd_(-1), + shm_size_(0), addr_(NULL) { + memset(&desc_, 0, sizeof(desc_)); } PluginImageData::~PluginImageData() { diff --git a/webkit/fileapi/file_system_file_util_proxy.cc b/webkit/fileapi/file_system_file_util_proxy.cc index 4e2158f..d77191a 100644 --- a/webkit/fileapi/file_system_file_util_proxy.cc +++ b/webkit/fileapi/file_system_file_util_proxy.cc @@ -19,7 +19,7 @@ typedef fileapi::FileSystemFileUtilProxy Proxy; class EnsureFileExistsHelper { public: - EnsureFileExistsHelper() : error_(base::PLATFORM_FILE_OK) {} + EnsureFileExistsHelper() : error_(base::PLATFORM_FILE_OK), created_(false) {} void RunWork(const Proxy::EnsureFileExistsTask& task) { error_ = task.Run(&created_); diff --git a/webkit/fileapi/file_system_operation.cc b/webkit/fileapi/file_system_operation.cc index 62b21f0..745273b 100644 --- a/webkit/fileapi/file_system_operation.cc +++ b/webkit/fileapi/file_system_operation.cc @@ -63,7 +63,8 @@ FileSystemOperation::FileSystemOperation( FileSystemContext* file_system_context) : proxy_(proxy), dispatcher_(dispatcher), - operation_context_(file_system_context, NULL) { + operation_context_(file_system_context, NULL), + peer_handle_(base::kNullProcessHandle) { #ifndef NDEBUG pending_operation_ = kOperationNone; #endif @@ -721,10 +722,12 @@ void FileSystemOperation::DidOpenFile( bool unused) { if (!dispatcher_.get()) return; - if (rv == base::PLATFORM_FILE_OK) + if (rv == base::PLATFORM_FILE_OK) { + CHECK_NE(base::kNullProcessHandle, peer_handle_); dispatcher_->DidOpenFile(file.ReleaseValue(), peer_handle_); - else + } else { dispatcher_->DidFail(rv); + } } void FileSystemOperation::OnFileOpenedForWrite( diff --git a/webkit/fileapi/local_file_util.cc b/webkit/fileapi/local_file_util.cc index 223beea..26ebc3b 100644 --- a/webkit/fileapi/local_file_util.cc +++ b/webkit/fileapi/local_file_util.cc @@ -23,6 +23,9 @@ class LocalFileEnumerator : public FileSystemFileUtil::AbstractFileEnumerator { : file_enum_(platform_root_path, recursive, file_type), platform_root_path_(platform_root_path), virtual_root_path_(virtual_root_path) { +#if defined(OS_WIN) + memset(&file_util_info_, 0, sizeof(file_util_info_)); +#endif // defined(OS_WIN) } ~LocalFileEnumerator() {} diff --git a/webkit/fileapi/native_file_util.cc b/webkit/fileapi/native_file_util.cc index c7ee8fc..b87fca7 100644 --- a/webkit/fileapi/native_file_util.cc +++ b/webkit/fileapi/native_file_util.cc @@ -18,6 +18,9 @@ class NativeFileEnumerator : public FileSystemFileUtil::AbstractFileEnumerator { bool recursive, file_util::FileEnumerator::FileType file_type) : file_enum_(root_path, recursive, file_type) { +#if defined(OS_WIN) + memset(&file_util_info_, 0, sizeof(file_util_info_)); +#endif // defined(OS_WIN) } ~NativeFileEnumerator() {} diff --git a/webkit/quota/quota_database.cc b/webkit/quota/quota_database.cc index b668d6a..a7e161f 100644 --- a/webkit/quota/quota_database.cc +++ b/webkit/quota/quota_database.cc @@ -110,7 +110,11 @@ struct QuotaDatabase::QuotaTableImporter { }; // Clang requires explicit out-of-line constructors for them. -QuotaDatabase::QuotaTableEntry::QuotaTableEntry() {} +QuotaDatabase::QuotaTableEntry::QuotaTableEntry() + : type(kStorageTypeUnknown), + quota(0) { +} + QuotaDatabase::QuotaTableEntry::QuotaTableEntry( const std::string& host, StorageType type, @@ -120,7 +124,11 @@ QuotaDatabase::QuotaTableEntry::QuotaTableEntry( quota(quota) { } -QuotaDatabase::OriginInfoTableEntry::OriginInfoTableEntry() {} +QuotaDatabase::OriginInfoTableEntry::OriginInfoTableEntry() + : type(kStorageTypeUnknown), + used_count(0) { +} + QuotaDatabase::OriginInfoTableEntry::OriginInfoTableEntry( const GURL& origin, StorageType type, |