From 0bc5b663b3166f562053413ce9381ad481e68a99 Mon Sep 17 00:00:00 2001 From: Neil Date: Mon, 18 Mar 2019 13:50:04 +1100 Subject: Backport: Minor warnings fixed - uninitialized, nullptr, type agreement, avoid casts. Backport of changeset 7320:304d26d7137f, but with without the C++17 multi-byte helper functions from a previous changeset. --- win32/ScintillaWin.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/win32/ScintillaWin.cxx b/win32/ScintillaWin.cxx index 2704cde4c..d4f9a7a14 100644 --- a/win32/ScintillaWin.cxx +++ b/win32/ScintillaWin.cxx @@ -836,7 +836,7 @@ sptr_t ScintillaWin::WndPaint() { // Redirect assertions to debug output and save current state const bool assertsPopup = Platform::ShowAssertionPopUps(false); paintState = painting; - PAINTSTRUCT ps; + PAINTSTRUCT ps = {}; // Removed since this interferes with reporting other assertions as it occurs repeatedly //PLATFORM_ASSERT(hRgnUpdate == NULL); @@ -2052,7 +2052,7 @@ public: return 1; } - unsigned int lenFlat = 0; + size_t lenFlat = 0; for (size_t mixIndex=0; mixIndex < nUtf16Mixed; mixIndex++) { if ((lenFlat + 20) > utf16Folded.size()) utf16Folded.resize(lenFlat + 60); @@ -2209,7 +2209,7 @@ public: PLATFORM_ASSERT(ptr); HGLOBAL handCopy = hand; ::GlobalUnlock(hand); - ptr = 0; + ptr = nullptr; hand = 0; return handCopy; } -- cgit v1.2.3