Code enhancement: remove some MSVS analysis warning (Part 2)
parent
61d96cd971
commit
f85435d962
|
@ -4497,7 +4497,7 @@ void Notepad_plus::docOpenInNewInstance(FileTransferMode mode, int x, int y)
|
|||
|
||||
if (x)
|
||||
{
|
||||
TCHAR pX[10];
|
||||
TCHAR pX[10]{};
|
||||
_itow(x, pX, 10);
|
||||
command += TEXT(" -x");
|
||||
command += pX;
|
||||
|
@ -4505,7 +4505,7 @@ void Notepad_plus::docOpenInNewInstance(FileTransferMode mode, int x, int y)
|
|||
|
||||
if (y)
|
||||
{
|
||||
TCHAR pY[10];
|
||||
TCHAR pY[10]{};
|
||||
_itow(y, pY, 10);
|
||||
command += TEXT(" -y");
|
||||
command += pY;
|
||||
|
|
|
@ -672,6 +672,9 @@ void FileManager::closeBuffer(BufferID id, ScintillaEditView * identifier)
|
|||
// backupFileName is sentinel of backup mode: if it's not NULL, then we use it (load it). Otherwise we use filename
|
||||
BufferID FileManager::loadFile(const TCHAR* filename, Document doc, int encoding, const TCHAR* backupFileName, FILETIME fileNameTimestamp)
|
||||
{
|
||||
if (!filename)
|
||||
return BUFFER_INVALID;
|
||||
|
||||
//Get file size
|
||||
int64_t fileSize = -1;
|
||||
const TCHAR* pPath = filename;
|
||||
|
|
|
@ -154,7 +154,7 @@ private:
|
|||
enum CurrentPosInLineStatus { pos_infront, pos_between, pos_inside, pos_behind };
|
||||
|
||||
struct CurrentPosInLineInfo {
|
||||
CurrentPosInLineStatus _status;
|
||||
CurrentPosInLineStatus _status = pos_infront;
|
||||
intptr_t auxiliaryInfo = -1; // according the status
|
||||
};
|
||||
|
||||
|
|
|
@ -177,7 +177,7 @@ void AnsiCharPanel::insertChar(unsigned char char2insert) const
|
|||
|
||||
void AnsiCharPanel::insertString(LPWSTR string2insert) const
|
||||
{
|
||||
char multiByteStr[10];
|
||||
char multiByteStr[10]{};
|
||||
int codepage = (*_ppEditView)->getCurrentBuffer()->getEncoding();
|
||||
if (codepage == -1)
|
||||
{
|
||||
|
|
|
@ -57,7 +57,7 @@ ClipboardData ClipboardHistoryPanel::getClipboadData()
|
|||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
else if (lpWchar != nullptr)
|
||||
{
|
||||
int nbBytes = (lstrlenW(lpWchar) + 1) * sizeof(wchar_t);
|
||||
for (int i = 0 ; i < nbBytes ; ++i)
|
||||
|
|
Loading…
Reference in New Issue