diff options
author | jhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-12-21 00:12:39 +0000 |
---|---|---|
committer | jhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-12-21 00:12:39 +0000 |
commit | b1a975e5d378cea4913320f401f507119ce58fbb (patch) | |
tree | f53f61c734183c7426852ad9a002a879e548bb17 | |
parent | 4b1c1134d7b7dbfd5e0fcdec39a79390364c9f16 (diff) | |
download | chromium_src-b1a975e5d378cea4913320f401f507119ce58fbb.zip chromium_src-b1a975e5d378cea4913320f401f507119ce58fbb.tar.gz chromium_src-b1a975e5d378cea4913320f401f507119ce58fbb.tar.bz2 |
Coverity: Initialize member variables.
CID=6462,16392,16996,17268,100987,101018,102401,102417,102476,102484,102513
102546,102552,102567,102617,102674,102677,102678,102679,102681,102685,
102714,102750,102751,102781
BUG=none
TEST=none
R=groby
Review URL: http://codereview.chromium.org/9005015
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@115234 0039d316-1c4b-4281-b951-d872f2087c98
26 files changed, 66 insertions, 20 deletions
diff --git a/chrome/browser/extensions/extension_web_socket_proxy_private_api.cc b/chrome/browser/extensions/extension_web_socket_proxy_private_api.cc index ddfe14c..367bdfb 100644 --- a/chrome/browser/extensions/extension_web_socket_proxy_private_api.cc +++ b/chrome/browser/extensions/extension_web_socket_proxy_private_api.cc @@ -32,7 +32,10 @@ const char kPermissionDeniedError[] = } WebSocketProxyPrivate::WebSocketProxyPrivate() - : listening_port_(-1), do_tls_(false), is_finalized_(false){ + : port_(-1), + listening_port_(-1), + do_tls_(false), + is_finalized_(false) { } WebSocketProxyPrivate::~WebSocketProxyPrivate() { diff --git a/chrome/browser/history/in_memory_url_index.cc b/chrome/browser/history/in_memory_url_index.cc index eb03b95..384322f8 100644 --- a/chrome/browser/history/in_memory_url_index.cc +++ b/chrome/browser/history/in_memory_url_index.cc @@ -115,14 +115,20 @@ int ScoreForValue(int value, const int* value_ranks) { InMemoryURLIndex::InMemoryURLIndex(const FilePath& history_dir) : history_dir_(history_dir), private_data_(new URLIndexPrivateData), - cached_at_shutdown_(false) { + cached_at_shutdown_(false), + pre_filter_item_count(0), + post_filter_item_count(0), + post_scoring_item_count(0) { InMemoryURLIndex::InitializeSchemeWhitelist(&scheme_whitelist_); } // Called only by unit tests. InMemoryURLIndex::InMemoryURLIndex() : private_data_(new URLIndexPrivateData), - cached_at_shutdown_(false) { + cached_at_shutdown_(false), + pre_filter_item_count(0), + post_filter_item_count(0), + post_scoring_item_count(0) { InMemoryURLIndex::InitializeSchemeWhitelist(&scheme_whitelist_); } diff --git a/chrome/browser/policy/cloud_policy_subsystem.cc b/chrome/browser/policy/cloud_policy_subsystem.cc index 21663eb..b8e40dd 100644 --- a/chrome/browser/policy/cloud_policy_subsystem.cc +++ b/chrome/browser/policy/cloud_policy_subsystem.cc @@ -205,6 +205,8 @@ CloudPolicyCacheBase* CloudPolicySubsystem::GetCloudPolicyCacheBase() const { } CloudPolicySubsystem::CloudPolicySubsystem() - : refresh_pref_name_(NULL) {} + : refresh_pref_name_(NULL), + data_store_(NULL) { +} } // namespace policy diff --git a/chrome/browser/speech/speech_input_bubble_views.cc b/chrome/browser/speech/speech_input_bubble_views.cc index 5e56c73..e7714c9 100644 --- a/chrome/browser/speech/speech_input_bubble_views.cc +++ b/chrome/browser/speech/speech_input_bubble_views.cc @@ -93,6 +93,12 @@ SpeechInputBubbleView::SpeechInputBubbleView( delegate_(delegate), element_rect_(element_rect), tab_contents_(tab_contents), + icon_(NULL), + heading_(NULL), + message_(NULL), + try_again_(NULL), + cancel_(NULL), + mic_settings_(NULL), display_mode_(SpeechInputBubbleBase::DISPLAY_MODE_WARM_UP), kIconLayoutMinWidth(ResourceBundle::GetSharedInstance().GetBitmapNamed( IDR_SPEECH_INPUT_MIC_EMPTY)->width()) { diff --git a/chrome/browser/ui/snapshot_tab_helper.cc b/chrome/browser/ui/snapshot_tab_helper.cc index 1a073dc..0078d57 100644 --- a/chrome/browser/ui/snapshot_tab_helper.cc +++ b/chrome/browser/ui/snapshot_tab_helper.cc @@ -10,7 +10,8 @@ #include "content/public/browser/notification_service.h" SnapshotTabHelper::SnapshotTabHelper(TabContentsWrapper* wrapper) - : TabContentsObserver(wrapper->tab_contents()) { + : TabContentsObserver(wrapper->tab_contents()), + wrapper_(wrapper) { } SnapshotTabHelper::~SnapshotTabHelper() { diff --git a/chrome/browser/ui/views/sad_tab_view.cc b/chrome/browser/ui/views/sad_tab_view.cc index 1e65bc6..046a794 100644 --- a/chrome/browser/ui/views/sad_tab_view.cc +++ b/chrome/browser/ui/views/sad_tab_view.cc @@ -46,7 +46,8 @@ SadTabView::SadTabView(TabContents* tab_contents, Kind kind) ResourceBundle::BaseFont)), message_(NULL), help_link_(NULL), - feedback_link_(NULL) { + feedback_link_(NULL), + reload_button_(NULL) { DCHECK(tab_contents); // Sometimes the user will never see this tab, so keep track of the total diff --git a/chrome/browser/ui/views/web_intent_picker_view.cc b/chrome/browser/ui/views/web_intent_picker_view.cc index 297d783..75c3ffe 100644 --- a/chrome/browser/ui/views/web_intent_picker_view.cc +++ b/chrome/browser/ui/views/web_intent_picker_view.cc @@ -148,7 +148,9 @@ WebIntentPickerView::WebIntentPickerView(views::View* anchor_view, WebIntentPickerDelegate* delegate) : BubbleDelegateView(anchor_view, views::BubbleBorder::TOP_LEFT), delegate_(delegate), - button_hbox_(NULL) {} + button_hbox_(NULL), + plus_button_(NULL) { +} WebIntentPickerView::~WebIntentPickerView() { } diff --git a/content/browser/renderer_host/render_message_filter.cc b/content/browser/renderer_host/render_message_filter.cc index 7478a19..e8685ec 100644 --- a/content/browser/renderer_host/render_message_filter.cc +++ b/content/browser/renderer_host/render_message_filter.cc @@ -279,7 +279,8 @@ RenderMessageFilter::RenderMessageFilter( render_widget_helper_(render_widget_helper), incognito_(browser_context->IsOffTheRecord()), webkit_context_(browser_context->GetWebKitContext()), - render_process_id_(render_process_id) { + render_process_id_(render_process_id), + cpu_usage_(0) { DCHECK(request_context_); render_widget_helper_->Init(render_process_id_, resource_dispatcher_host_); diff --git a/crypto/p224_spake.cc b/crypto/p224_spake.cc index ec0c416..af3c2b8 100644 --- a/crypto/p224_spake.cc +++ b/crypto/p224_spake.cc @@ -99,6 +99,9 @@ P224EncryptedKeyExchange::P224EncryptedKeyExchange( PeerType peer_type, const base::StringPiece& password) : state_(kStateInitial), is_server_(peer_type == kPeerTypeServer) { + memset(&x_, 0, sizeof(x_)); + memset(&expected_authenticator_, 0, sizeof(expected_authenticator_)); + // x_ is a random scalar. base::RandBytes(x_, sizeof(x_)); diff --git a/crypto/signature_creator_win.cc b/crypto/signature_creator_win.cc index 244b06a..94fe87d 100644 --- a/crypto/signature_creator_win.cc +++ b/crypto/signature_creator_win.cc @@ -23,7 +23,7 @@ SignatureCreator* SignatureCreator::Create(RSAPrivateKey* key) { return result.release(); } -SignatureCreator::SignatureCreator() : hash_object_(0) {} +SignatureCreator::SignatureCreator() : key_(NULL), hash_object_(0) {} SignatureCreator::~SignatureCreator() {} diff --git a/media/base/pipeline_impl.cc b/media/base/pipeline_impl.cc index f4d8774..5ea444c 100644 --- a/media/base/pipeline_impl.cc +++ b/media/base/pipeline_impl.cc @@ -69,7 +69,8 @@ PipelineImpl::PipelineImpl(MessageLoop* message_loop, MediaLog* media_log) waiting_for_clock_update_(false), state_(kCreated), current_bytes_(0), - creation_time_(base::Time::Now()) { + creation_time_(base::Time::Now()), + is_downloading_data_(false) { media_log_->AddEvent(media_log_->CreatePipelineStateChangedEvent(kCreated)); ResetState(); media_log_->AddEvent( diff --git a/media/filters/reference_audio_renderer.cc b/media/filters/reference_audio_renderer.cc index 8e95628..9aa38eb 100644 --- a/media/filters/reference_audio_renderer.cc +++ b/media/filters/reference_audio_renderer.cc @@ -13,7 +13,8 @@ namespace media { ReferenceAudioRenderer::ReferenceAudioRenderer(AudioManager* audio_manager) : AudioRendererBase(), audio_manager_(audio_manager), - bytes_per_second_(0) { + bytes_per_second_(0), + buffer_capacity_(0) { } ReferenceAudioRenderer::~ReferenceAudioRenderer() { diff --git a/net/base/origin_bound_cert_store.cc b/net/base/origin_bound_cert_store.cc index f597204..6a31a7e 100644 --- a/net/base/origin_bound_cert_store.cc +++ b/net/base/origin_bound_cert_store.cc @@ -6,7 +6,9 @@ namespace net { -OriginBoundCertStore::OriginBoundCert::OriginBoundCert() {} +OriginBoundCertStore::OriginBoundCert::OriginBoundCert() + : type_(CLIENT_CERT_INVALID_TYPE) { +} OriginBoundCertStore::OriginBoundCert::OriginBoundCert( const std::string& origin, diff --git a/net/socket/ssl_client_socket.h b/net/socket/ssl_client_socket.h index 0116e37..0637f4c 100644 --- a/net/socket/ssl_client_socket.h +++ b/net/socket/ssl_client_socket.h @@ -68,7 +68,7 @@ class NET_EXPORT SSLClientSocket : public SSLSocket { // an agreement about the application level protocol to speak over a // connection. enum NextProtoStatus { - // WARNING: These values are serialised to disk. Don't change them. + // WARNING: These values are serialized to disk. Don't change them. kNextProtoUnsupported = 0, // The server doesn't support NPN. kNextProtoNegotiated = 1, // We agreed on a protocol. diff --git a/net/socket/ssl_client_socket_nss.cc b/net/socket/ssl_client_socket_nss.cc index 1dcc232..815ce94 100644 --- a/net/socket/ssl_client_socket_nss.cc +++ b/net/socket/ssl_client_socket_nss.cc @@ -447,6 +447,7 @@ SSLClientSocketNSS::SSLClientSocketNSS(ClientSocketHandle* transport_socket, cert_verifier_(context.cert_verifier), ob_cert_xtn_negotiated_(false), origin_bound_cert_service_(context.origin_bound_cert_service), + ob_cert_type_(CLIENT_CERT_INVALID_TYPE), ob_cert_request_handle_(NULL), handshake_callback_called_(false), completed_handshake_(false), diff --git a/net/socket/ssl_server_socket_nss.cc b/net/socket/ssl_server_socket_nss.cc index 5b57492..9135464 100644 --- a/net/socket/ssl_server_socket_nss.cc +++ b/net/socket/ssl_server_socket_nss.cc @@ -60,6 +60,7 @@ SSLServerSocketNSS::SSLServerSocketNSS( const SSLConfig& ssl_config) : transport_send_busy_(false), transport_recv_busy_(false), + user_handshake_callback_(NULL), nss_fd_(NULL), nss_bufs_(NULL), transport_socket_(transport_socket), diff --git a/net/socket/transport_client_socket_pool.cc b/net/socket/transport_client_socket_pool.cc index 02d48fba..001225e 100644 --- a/net/socket/transport_client_socket_pool.cc +++ b/net/socket/transport_client_socket_pool.cc @@ -99,7 +99,9 @@ TransportConnectJob::TransportConnectJob( BoundNetLog::Make(net_log, NetLog::SOURCE_CONNECT_JOB)), params_(params), client_socket_factory_(client_socket_factory), - resolver_(host_resolver) {} + resolver_(host_resolver), + next_state_(STATE_NONE) { +} TransportConnectJob::~TransportConnectJob() { // We don't worry about cancelling the host resolution and TCP connect, since diff --git a/net/url_request/url_request_job_manager.cc b/net/url_request/url_request_job_manager.cc index 71e9e55..f149fb2 100644 --- a/net/url_request/url_request_job_manager.cc +++ b/net/url_request/url_request_job_manager.cc @@ -262,11 +262,10 @@ void URLRequestJobManager::UnregisterRequestInterceptor( interceptors_.erase(i); } -URLRequestJobManager::URLRequestJobManager() : enable_file_access_(false) { -#ifndef NDEBUG - allowed_thread_ = 0; - allowed_thread_initialized_ = false; -#endif +URLRequestJobManager::URLRequestJobManager() + : allowed_thread_(0), + allowed_thread_initialized_(false), + enable_file_access_(false) { } URLRequestJobManager::~URLRequestJobManager() {} diff --git a/ppapi/native_client/src/shared/ppapi_proxy/browser_ppp.h b/ppapi/native_client/src/shared/ppapi_proxy/browser_ppp.h index 7daecae..20ef900 100644 --- a/ppapi/native_client/src/shared/ppapi_proxy/browser_ppp.h +++ b/ppapi/native_client/src/shared/ppapi_proxy/browser_ppp.h @@ -37,6 +37,7 @@ class BrowserPpp { ppp_messaging_interface_(NULL), ppp_input_event_interface_(NULL) { CHECK(main_channel_ != NULL); + upcall_thread_.tid = 0; } ~BrowserPpp() {} diff --git a/ppapi/proxy/serialized_structs.cc b/ppapi/proxy/serialized_structs.cc index e327b60..bd17e4d 100644 --- a/ppapi/proxy/serialized_structs.cc +++ b/ppapi/proxy/serialized_structs.cc @@ -73,6 +73,7 @@ PPBFlash_DrawGlyphs_Params::PPBFlash_DrawGlyphs_Params() clip.size.width = 0; position.x = 0; position.y = 0; + allow_subpixel_aa = PP_FALSE; } PPBFlash_DrawGlyphs_Params::~PPBFlash_DrawGlyphs_Params() {} diff --git a/ppapi/shared_impl/ppb_file_io_shared.cc b/ppapi/shared_impl/ppb_file_io_shared.cc index a51c33f..dcad4d7 100644 --- a/ppapi/shared_impl/ppb_file_io_shared.cc +++ b/ppapi/shared_impl/ppb_file_io_shared.cc @@ -24,6 +24,8 @@ using thunk::PPB_FileRef_API; PPB_FileIO_Shared::CallbackEntry::CallbackEntry() : read_buffer(NULL), info(NULL) { + callback.func = NULL; + callback.user_data = NULL; } PPB_FileIO_Shared::CallbackEntry::CallbackEntry(const CallbackEntry& entry) diff --git a/remoting/jingle_glue/ssl_socket_adapter.cc b/remoting/jingle_glue/ssl_socket_adapter.cc index 5bf2f73..314e3cd 100644 --- a/remoting/jingle_glue/ssl_socket_adapter.cc +++ b/remoting/jingle_glue/ssl_socket_adapter.cc @@ -29,7 +29,8 @@ SSLSocketAdapter::SSLSocketAdapter(AsyncSocket* socket) cert_verifier_(new net::CertVerifier()), ssl_state_(SSLSTATE_NONE), read_state_(IOSTATE_NONE), - write_state_(IOSTATE_NONE) { + write_state_(IOSTATE_NONE), + data_transferred_(0) { transport_socket_ = new TransportSocket(socket, this); } diff --git a/webkit/glue/context_menu.cc b/webkit/glue/context_menu.cc index d4bad35..634bfd9 100644 --- a/webkit/glue/context_menu.cc +++ b/webkit/glue/context_menu.cc @@ -24,6 +24,7 @@ ContextMenuParams::ContextMenuParams() is_image_blocked(false), frame_id(0), media_flags(0), + speech_input_enabled(false), spellcheck_enabled(false), is_editable(false), edit_flags(0), diff --git a/webkit/media/webmediaplayer_impl.cc b/webkit/media/webmediaplayer_impl.cc index 3d17f86..37eed33 100644 --- a/webkit/media/webmediaplayer_impl.cc +++ b/webkit/media/webmediaplayer_impl.cc @@ -115,6 +115,7 @@ WebMediaPlayerImpl::WebMediaPlayerImpl( seeking_(false), playback_rate_(0.0f), pending_seek_(false), + pending_seek_seconds_(0.0f), client_(client), proxy_(NULL), delegate_(delegate), diff --git a/webkit/plugins/ppapi/ppb_transport_impl.cc b/webkit/plugins/ppapi/ppb_transport_impl.cc index da656c8..23c5ab8 100644 --- a/webkit/plugins/ppapi/ppb_transport_impl.cc +++ b/webkit/plugins/ppapi/ppb_transport_impl.cc @@ -67,6 +67,7 @@ WebKit::WebFrame* GetFrameForResource(const ::ppapi::Resource* resource) { PPB_Transport_Impl::PPB_Transport_Impl(PP_Instance instance) : Resource(instance), + type_(PP_TRANSPORTTYPE_DATAGRAM), started_(false), writable_(false) { } diff --git a/webkit/plugins/ppapi/ppb_websocket_impl.cc b/webkit/plugins/ppapi/ppb_websocket_impl.cc index 48bc1f5..825a4e9 100644 --- a/webkit/plugins/ppapi/ppb_websocket_impl.cc +++ b/webkit/plugins/ppapi/ppb_websocket_impl.cc @@ -85,6 +85,12 @@ PPB_WebSocket_Impl::PPB_WebSocket_Impl(PP_Instance instance) close_was_clean_(PP_FALSE), buffered_amount_(0), buffered_amount_after_close_(0) { + connect_callback_.func = NULL; + connect_callback_.user_data = NULL; + receive_callback_.func = NULL; + receive_callback_.user_data = NULL; + close_callback_.func = NULL; + close_callback_.user_data = NULL; empty_string_ = new StringVar("", 0); } |