Merge pull request #919 from ssakash/coverity_init

Coverity: Initialize class members
This commit is contained in:
Gregory Hainaut 2015-10-25 20:08:46 +01:00
commit 50e6306331
13 changed files with 30 additions and 31 deletions

View File

@ -77,7 +77,7 @@ public:
bool Enabled;
protected:
BaseTraceLogSource() {}
BaseTraceLogSource() : m_Descriptor(NULL), Enabled(false) {}
public:
TraceLog_ImplementBaseAPI(BaseTraceLogSource)

View File

@ -179,7 +179,10 @@ void InputIsoFile::_init()
m_read_inprogress = false;
m_read_count = 0;
ReadUnit = 0;
m_current_lsn = -1;
m_read_lsn = -1;
m_reader = NULL;
}
// Tests the specified filename to see if it is a supported ISO type. This function typically

View File

@ -48,7 +48,6 @@ protected:
AsyncFileReader* m_reader;
s32 m_current_lsn;
uint m_current_count;
isoType m_type;
u32 m_flags;

View File

@ -65,9 +65,6 @@ struct SysTraceLogDescriptor
// logging volume).
class SysTraceLog : public TextFileTraceLog
{
public:
const char* PrePrefix;
public:
TraceLog_ImplementBaseAPI(SysTraceLog)
@ -77,12 +74,6 @@ public:
void DoWrite( const char *fmt ) const;
SysTraceLog& SetPrefix( const char* name )
{
PrePrefix = name;
return *this;
}
};
class SysTraceLog_EE : public SysTraceLog

View File

@ -206,7 +206,7 @@ public:
private:
DisassemblyEntry* getEntry(u32 address);
std::map<u32,DisassemblyEntry*> entries;
DebugInterface* cpu;
DebugInterface* cpu = NULL;
static int maxParamChars;
};

View File

@ -47,22 +47,12 @@ protected:
// A list of menu items belonging to this plugin's menu.
MenuItemAddonList m_PluginMenuItems;
// Base index for inserting items, usually points to the position
// after the heading entry and separator.
int m_InsertIndexBase;
// Current index for inserting menu items; increments with each item
// added by a plugin.
int m_InsertIndexCur;
public:
PluginsEnum_t PluginId;
wxMenu& MyMenu;
wxMenu& MyMenu;
public:
PerPluginMenuInfo() : MyMenu( *new wxMenu() )
{
}
PerPluginMenuInfo() : MyMenu(*new wxMenu()), PluginId (PluginId_Count) {}
virtual ~PerPluginMenuInfo() throw();
@ -226,4 +216,4 @@ protected:
friend class Pcsx2App;
};
extern int GetPluginMenuId_Settings( PluginsEnum_t pid );
extern int GetPluginMenuId_Settings( PluginsEnum_t pid );

View File

@ -29,6 +29,9 @@ bool RemoveDirectory( const wxString& dirname );
FolderMemoryCard::FolderMemoryCard() {
m_slot = 0;
m_isEnabled = false;
m_performFileWrites = false;
m_framesUntilFlush = 0;
m_timeLastWritten = 0;
}
void FolderMemoryCard::InitializeInternalData() {

View File

@ -28,8 +28,8 @@ namespace Panels
wxStaticBoxSizer* m_miscGroup;
public:
BaseCpuLogOptionsPanel( wxWindow* parent, const wxString& title, wxOrientation orient=wxVERTICAL )
: CheckedStaticBox( parent, orient, title ) {}
BaseCpuLogOptionsPanel(wxWindow* parent, const wxString& title, wxOrientation orient = wxVERTICAL)
: CheckedStaticBox(parent, orient, title), m_miscGroup(NULL){}
virtual wxStaticBoxSizer* GetMiscGroup() const { return m_miscGroup; }
virtual CheckedStaticBox* GetStaticBox( const wxString& subgroup ) const=0;

View File

@ -190,6 +190,8 @@ Panels::BaseMcdListPanel::BaseMcdListPanel( wxWindow* parent )
);
m_listview = NULL;
s_leftside_buttons = NULL;
s_rightside_buttons = NULL;
m_btn_Refresh = new wxButton( this, wxID_ANY, _("Refresh list") );

View File

@ -62,11 +62,14 @@ struct McdSlotItem
McdSlotItem()
{
Slot = -1;
Slot = -1;
SizeInMB = 0;
Type = MemoryCard_None;
IsPSX = false;
IsPresent = false;
IsEnabled = false;
IsFormatted = false;
}
};

View File

@ -227,7 +227,7 @@ protected:
IMPLEMENT_DYNAMIC_CLASS(ApplyPluginsDialog, WaitForTaskDialog)
ApplyPluginsDialog::ApplyPluginsDialog( BaseApplicableConfigPanel* panel )
: WaitForTaskDialog( _("Applying settings...") )
: WaitForTaskDialog(_("Applying settings...")), m_panel(NULL)
{
GetSysExecutorThread().PostEvent( new SysExecEvent_ApplyPlugins( this, m_sync ) );
}

View File

@ -2982,6 +2982,7 @@ bool GSState::IsMipMapActive()
GSState::GSTransferBuffer::GSTransferBuffer()
{
x = y = 0;
overflow = false;
start = end = total = 0;
buff = (uint8*)_aligned_malloc(1024 * 1024 * 4, 32);
}

View File

@ -110,11 +110,18 @@ public:
Portaudio()
{
m_ApiId=-1;
m_SuggestedLatencyMinimal = true;
m_UseHardware = false;
m_WasapiExclusiveMode = false;
started = false;
stream = NULL;
ActualPaCallback = NULL;
m_ApiId=-1;
m_SuggestedLatencyMS = 20;
actualUsedChannels = 0;
writtenSoFar = 0;
writtenLastTime = 0;
availableLastTime = 0;
}
s32 Init()