Skip to content
Permalink
Browse files

Fix for various warnings

  • Loading branch information
ntfshard authored and eranif committed May 29, 2019
1 parent b7977b4 commit 5d1f2554e88cf719407f9f18665f12fb7a993cf7
@@ -51,6 +51,7 @@ DotWriter::DotWriter()
dwce = 0;
dwtn = 0;
dwte = 0;
m_writedotfileFlag = false;
dwhideparams = false;
dwhidenamespaces = false;
dwstripparams = false;
@@ -47,8 +47,8 @@ void Tester::RunTests()
if(success == totalTests) {
printf(" All tests passed successfully!!\n");
} else {
printf(" %u of %u tests passed\n", (int)success, (int)totalTests);
printf(" %u of %u tests failed\n", (int)errors, (int)totalTests);
printf(" %u of %u tests passed\n", (unsigned int)success, (unsigned int)totalTests);
printf(" %u of %u tests failed\n", (unsigned int)errors, (unsigned int)totalTests);
}
}

@@ -3,7 +3,8 @@
#include "file_logger.h"

CxxPreProcessor::CxxPreProcessor()
: m_maxDepth(-1)
: m_options(0)
, m_maxDepth(-1)
, m_currentDepth(0)
{
}
@@ -5,6 +5,7 @@
CxxScannerBase::CxxScannerBase(CxxPreProcessor* preProcessor, const wxFileName& filename)
: m_scanner(NULL)
, m_filename(filename)
, m_options(0)
, m_preProcessor(preProcessor)
{
wxString content;
@@ -71,6 +71,7 @@ class WXDLLIMPEXP_CL CxxVariable
CxxVariable(eCxxStandard standard);
CxxVariable()
: m_standard(eCxxStandard::kCxx11)
, m_isAuto(false)
{
}

@@ -96,7 +96,7 @@ bool UnixProcess::ReadAll(int fd, std::string& content, int timeoutMilliseconds)
bool UnixProcess::Write(int fd, const std::string& message, std::atomic_bool& shutdown)
{
int bytes = 0;
std::string tmp = std::move(message);
std::string tmp = message;
const int chunkSize = 4096;
while(!tmp.empty() && !shutdown.load()) {
errno = 0;
@@ -105,7 +105,10 @@ static void SetCDATANodeContent(wxXmlNode* node, const wxString& text)
}

// class Tab info
TabInfo::TabInfo() {}
TabInfo::TabInfo()
: m_firstVisibleLine(0)
, m_currentLine(0)
{}

TabInfo::~TabInfo() {}

@@ -10,5 +10,6 @@ clGotoEntry::clGotoEntry(const wxString& desc, const wxString& shortcut, int id)

clGotoEntry::clGotoEntry()
: m_resourceID(wxNOT_FOUND)
, m_flags(0)
{
}
}
@@ -39,6 +39,11 @@ struct tagCallTipInfo {
std::vector<std::pair<int, int> > paramLen;
};

clCallTip::clCallTip()
: m_curr(0)
{
}

clCallTip::clCallTip(const std::vector<TagEntryPtr>& tips)
: m_curr(0)
{
@@ -51,6 +56,7 @@ clCallTip& clCallTip::operator=(const clCallTip& rhs)
{
if(this == &rhs) return *this;
m_tips = rhs.m_tips;
m_curr = rhs.m_curr;
return *this;
}

@@ -67,7 +67,7 @@ class WXDLLIMPEXP_CL clCallTip
/**
* default constructor
*/
clCallTip() {}
clCallTip();

/**
* Copy constructor
@@ -29,6 +29,8 @@ clCommandEvent::clCommandEvent(wxEventType commandType, int winid)
: wxCommandEvent(commandType, winid)
, m_answer(false)
, m_allowed(true)
, m_lineNumber(0)
, m_selected(false)
{
}

@@ -97,6 +97,11 @@ clSSH::clSSH(const wxString& host, const wxString& user, const wxString& pass, i

clSSH::clSSH()
: m_port(22)
, m_connected(false)
, m_session(NULL)
, m_channel(NULL)
, m_timer(NULL)
, m_owner(NULL)
{
}

@@ -171,6 +171,7 @@ class TokenContainer
TokenContainer()
: head(NULL)
, current(NULL)
, rew(false)
, retries(0)
{
}
@@ -41,7 +41,7 @@ class CommentParseResult {
{
std::map<size_t, std::string>::const_iterator iter = m_comments.begin();
for(; iter != m_comments.end(); iter++) {
printf("Line : %d\n", (unsigned int)iter->first);
printf("Line : %u\n", (unsigned int)iter->first);
printf("Comment:\n%s\n", iter->second.c_str());
}
}
@@ -54,7 +54,11 @@ class IDbAdapter
atPOSTGRES
};

IDbAdapter() {}
IDbAdapter()
: m_adapterType(atUNKNOWN)
{
}

virtual ~IDbAdapter() {}

/*! \brief Return opened DatabaseLayer for selected database. If dbName is empty, DatabaseLayer will be opend without defalut database. */
@@ -448,10 +448,10 @@ IDbType* MySqlDbAdapter::ConvertType(IDbType* pType)
if (!newType) {
newType = GetDbTypeByUniversalName(pType->GetUniversalType());
delete pType;
pType = NULL;
}
return newType;
}

IDbType* MySqlDbAdapter::GetDbTypeByUniversalName(IDbType::UNIVERSAL_TYPE type)
{
IDbType* newType = NULL;
@@ -539,10 +539,10 @@ IDbType* PostgreSqlDbAdapter::ConvertType(IDbType* pType) {
if (!newType) {
newType = GetDbTypeByUniversalName(pType->GetUniversalType());
delete pType;
pType = NULL;
}
return newType;
}

IDbType* PostgreSqlDbAdapter::GetDbTypeByUniversalName(IDbType::UNIVERSAL_TYPE type) {
IDbType* newType = NULL;
switch (type) {
@@ -52,7 +52,10 @@ class ColumnInfo
typedef std::vector<ColumnInfo> Vector_t;

public:
ColumnInfo() {}
ColumnInfo()
: m_type(0)
{
}

ColumnInfo(int type, const wxString& name)
: m_type(type)
@@ -321,10 +321,10 @@ IDbType* SQLiteDbAdapter::ConvertType(IDbType* pType) {
if (!newType ) {
newType = (SqliteType*) GetDbTypeByUniversalName(pType->GetUniversalType());
delete pType;
pType = NULL;
}
return newType;
}

IDbType* SQLiteDbAdapter::GetDbTypeByUniversalName(IDbType::UNIVERSAL_TYPE type) {
IDbType* newType = NULL;
switch (type) {
@@ -26,7 +26,9 @@
#include "externaltoolsdata.h"

ToolInfo::ToolInfo()
: m_flags(0)
: m_captureOutput(false)
, m_saveAllFiles(false)
, m_flags(0)
{
}

@@ -625,8 +625,10 @@ class IDebugger

public:
IDebugger()
: m_env(NULL)
, m_isRemoteDebugging(false){};
: m_observer(NULL)
, m_env(NULL)
, m_isRemoteDebugging(false)
, m_isRemoteExtended(false){};
virtual ~IDebugger(){};
void SetProjectName(const wxString& project) { m_debuggeeProjectName = project; }
void SetName(const wxString& name) { m_name = name; }
@@ -63,6 +63,7 @@ class LLDBCommand
: m_commandType(kCommandInvalid)
, m_interruptReason(kInterruptReasonNone)
, m_lldbId(0)
, m_frameId(0)
, m_processID(wxNOT_FOUND)
, m_displayFormat((int)eLLDBFormat::kFormatDefault)
{
@@ -30,6 +30,7 @@ LLDBThread::LLDBThread()
: m_id(wxNOT_FOUND)
, m_line(wxNOT_FOUND)
, m_active(false)
, m_suspended(false)
, m_stopReason( kStopReasonInvalid )
{
}
@@ -68,6 +68,7 @@ class LLDBVariable
: m_valueChanged(false)
, m_lldbId(wxNOT_FOUND)
, m_hasChildren(false)
, m_isWatch(false)
{
}
virtual ~LLDBVariable();
@@ -89,7 +89,7 @@ bool UnixProcess::ReadAll(int fd, std::string& content, int timeoutMilliseconds)
bool UnixProcess::Write(int fd, const std::string& message, std::atomic_bool& shutdown)
{
int bytes = 0;
std::string tmp = std::move(message);
std::string tmp = message;
const int chunkSize = 4096;
while(!tmp.empty() && !shutdown.load()) {
errno = 0;

0 comments on commit 5d1f255

Please sign in to comment.
You can’t perform that action at this time.