diff --git a/PowerEditor/src/MISC/Common/Common.cpp b/PowerEditor/src/MISC/Common/Common.cpp index a6dbefc21..4a5d3fe54 100644 --- a/PowerEditor/src/MISC/Common/Common.cpp +++ b/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 diff --git a/PowerEditor/src/Notepad_plus.cpp b/PowerEditor/src/Notepad_plus.cpp index a84bd4f32..9eb783a44 100644 --- a/PowerEditor/src/Notepad_plus.cpp +++ b/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; } diff --git a/PowerEditor/src/Parameters.cpp b/PowerEditor/src/Parameters.cpp index 82ea68f8a..ad1ca6c3e 100644 --- a/PowerEditor/src/Parameters.cpp +++ b/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(id)) { //found our match isFound = getInternalCommandShortcuts(childNode, _shortcuts[i]); diff --git a/PowerEditor/src/ScintillaComponent/ScintillaEditView.cpp b/PowerEditor/src/ScintillaComponent/ScintillaEditView.cpp index 9af96de2e..bca542c75 100644 --- a/PowerEditor/src/ScintillaComponent/ScintillaEditView.cpp +++ b/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; }