mirror of
https://github.com/notepad-plus-plus/notepad-plus-plus.git
synced 2025-07-22 21:34:58 +02:00
Code enhancement: remove some MSVS analysis warning (Part 2)
This commit is contained in:
parent
61d96cd971
commit
f85435d962
@ -4497,7 +4497,7 @@ void Notepad_plus::docOpenInNewInstance(FileTransferMode mode, int x, int y)
|
|||||||
|
|
||||||
if (x)
|
if (x)
|
||||||
{
|
{
|
||||||
TCHAR pX[10];
|
TCHAR pX[10]{};
|
||||||
_itow(x, pX, 10);
|
_itow(x, pX, 10);
|
||||||
command += TEXT(" -x");
|
command += TEXT(" -x");
|
||||||
command += pX;
|
command += pX;
|
||||||
@ -4505,7 +4505,7 @@ void Notepad_plus::docOpenInNewInstance(FileTransferMode mode, int x, int y)
|
|||||||
|
|
||||||
if (y)
|
if (y)
|
||||||
{
|
{
|
||||||
TCHAR pY[10];
|
TCHAR pY[10]{};
|
||||||
_itow(y, pY, 10);
|
_itow(y, pY, 10);
|
||||||
command += TEXT(" -y");
|
command += TEXT(" -y");
|
||||||
command += pY;
|
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
|
// 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)
|
BufferID FileManager::loadFile(const TCHAR* filename, Document doc, int encoding, const TCHAR* backupFileName, FILETIME fileNameTimestamp)
|
||||||
{
|
{
|
||||||
|
if (!filename)
|
||||||
|
return BUFFER_INVALID;
|
||||||
|
|
||||||
//Get file size
|
//Get file size
|
||||||
int64_t fileSize = -1;
|
int64_t fileSize = -1;
|
||||||
const TCHAR* pPath = filename;
|
const TCHAR* pPath = filename;
|
||||||
|
@ -154,7 +154,7 @@ private:
|
|||||||
enum CurrentPosInLineStatus { pos_infront, pos_between, pos_inside, pos_behind };
|
enum CurrentPosInLineStatus { pos_infront, pos_between, pos_inside, pos_behind };
|
||||||
|
|
||||||
struct CurrentPosInLineInfo {
|
struct CurrentPosInLineInfo {
|
||||||
CurrentPosInLineStatus _status;
|
CurrentPosInLineStatus _status = pos_infront;
|
||||||
intptr_t auxiliaryInfo = -1; // according the status
|
intptr_t auxiliaryInfo = -1; // according the status
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -177,7 +177,7 @@ void AnsiCharPanel::insertChar(unsigned char char2insert) const
|
|||||||
|
|
||||||
void AnsiCharPanel::insertString(LPWSTR string2insert) const
|
void AnsiCharPanel::insertString(LPWSTR string2insert) const
|
||||||
{
|
{
|
||||||
char multiByteStr[10];
|
char multiByteStr[10]{};
|
||||||
int codepage = (*_ppEditView)->getCurrentBuffer()->getEncoding();
|
int codepage = (*_ppEditView)->getCurrentBuffer()->getEncoding();
|
||||||
if (codepage == -1)
|
if (codepage == -1)
|
||||||
{
|
{
|
||||||
|
@ -57,7 +57,7 @@ ClipboardData ClipboardHistoryPanel::getClipboadData()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else if (lpWchar != nullptr)
|
||||||
{
|
{
|
||||||
int nbBytes = (lstrlenW(lpWchar) + 1) * sizeof(wchar_t);
|
int nbBytes = (lstrlenW(lpWchar) + 1) * sizeof(wchar_t);
|
||||||
for (int i = 0 ; i < nbBytes ; ++i)
|
for (int i = 0 ; i < nbBytes ; ++i)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user