Browse Source

Fix some gcc warnings

Fix #14845, close #14846
pull/14848/head
ozone10 9 months ago committed by Don Ho
parent
commit
9d92b0a869
  1. 4
      PowerEditor/src/MISC/Common/Common.cpp
  2. 1
      PowerEditor/src/Notepad_plus.cpp
  3. 6
      PowerEditor/src/Parameters.cpp
  4. 2
      PowerEditor/src/ScintillaComponent/ScintillaEditView.cpp

4
PowerEditor/src/MISC/Common/Common.cpp

@ -59,8 +59,8 @@ std::string getFileContent(const TCHAR *file2read)
char data[blockSize];
std::string wholeFileContent = "";
FILE *fp = _wfopen(file2read, TEXT("rb"));
if (!fp)
return "";
if (!fp)
return "";
size_t lenFile = 0;
do

1
PowerEditor/src/Notepad_plus.cpp

@ -6430,6 +6430,7 @@ void Notepad_plus::notifyBufferChanged(Buffer * buffer, int mask)
{
case DOC_UNNAMED: //nothing todo
case DOC_REGULAR: //nothing todo
case DOC_INACCESSIBLE: //nothing todo
{
break;
}

6
PowerEditor/src/Parameters.cpp

@ -2820,16 +2820,16 @@ void NppParameters::feedShortcut(TiXmlNodeA *node)
childNode ;
childNode = childNode->NextSibling("Shortcut"))
{
int id;
int id = 0;
const char* idStr = (childNode->ToElement())->Attribute("id", &id);
if (idStr)
{
//find the commandid that matches this Shortcut sc and alter it, push back its index in the modified list, if not present
size_t len = _shortcuts.size();
bool isFound = false;
for (size_t i = 0; i < len, !isFound; ++i)
for (size_t i = 0; i < len && !isFound; ++i)
{
if (_shortcuts[i].getID() == (unsigned long)id)
if (_shortcuts[i].getID() == static_cast<unsigned long>(id))
{ //found our match
isFound = getInternalCommandShortcuts(childNode, _shortcuts[i]);

2
PowerEditor/src/ScintillaComponent/ScintillaEditView.cpp

@ -505,7 +505,7 @@ LRESULT ScintillaEditView::scintillaNew_Proc(HWND hwnd, UINT Message, WPARAM wPa
// prevent "control characters" from being entered in text
// (don't need to be concerned about Tab or CR or LF etc here)
if ((NppParameters::getInstance()).getSVP()._npcNoInputC0 &&
((wParam >= 0 && wParam <= 31) || wParam == 127))
(wParam <= 31 || wParam == 127))
{
return FALSE;
}

Loading…
Cancel
Save