diff --git a/include/nana/paint/detail/image_processor.hpp b/include/nana/paint/detail/image_processor.hpp index 4051eb90..3832456f 100644 --- a/include/nana/paint/detail/image_processor.hpp +++ b/include/nana/paint/detail/image_processor.hpp @@ -426,7 +426,7 @@ namespace detail unsigned char * fade_table = nullptr; std::unique_ptr autoptr; - nana::pixel_argb_t rgb_imd; + nana::pixel_argb_t rgb_imd = {}; if(fade_rate != 0.0) { autoptr = detail::alloc_fade_table(1 - fade_rate); diff --git a/source/gui/detail/bedrock_posix.cpp b/source/gui/detail/bedrock_posix.cpp index 4f74f5a9..5a3a4abe 100644 --- a/source/gui/detail/bedrock_posix.cpp +++ b/source/gui/detail/bedrock_posix.cpp @@ -237,7 +237,7 @@ namespace detail if(wd_manager().available(wd) == false) return false; - core_window_t * prev_wd; + core_window_t * prev_wd = nullptr; if(thrd) { prev_wd = thrd->event_window; diff --git a/source/gui/detail/bedrock_windows.cpp b/source/gui/detail/bedrock_windows.cpp index 594c949f..11ef721a 100644 --- a/source/gui/detail/bedrock_windows.cpp +++ b/source/gui/detail/bedrock_windows.cpp @@ -760,7 +760,7 @@ namespace detail if (bedrock::instance().wd_manager().available(wd) == false) return; - basic_window* prev_event_wd; + basic_window* prev_event_wd = nullptr; if (thrd) { prev_event_wd = thrd->event_window; @@ -1630,7 +1630,7 @@ namespace detail if (wd_manager().available(wd) == false) return false; - basic_window* prev_event_wd; + basic_window* prev_event_wd = nullptr; if (thrd) { prev_event_wd = thrd->event_window; diff --git a/source/paint/pixel_buffer.cpp b/source/paint/pixel_buffer.cpp index f29c4068..e62a927b 100644 --- a/source/paint/pixel_buffer.cpp +++ b/source/paint/pixel_buffer.cpp @@ -457,7 +457,7 @@ namespace nana{ namespace paint HDC context = drawable->context; HBITMAP pixmap = drawable->pixmap; - HBITMAP orig_bmp; + HBITMAP orig_bmp = nullptr; if(need_dup) { context = ::CreateCompatibleDC(drawable->context); @@ -795,7 +795,7 @@ namespace nana{ namespace paint std::unique_ptr autoptr; auto rgb_color = clr.px_color().value; - nana::pixel_color_t rgb_imd; + nana::pixel_color_t rgb_imd = {}; if(fade) { autoptr = detail::alloc_fade_table(1 - fade_rate); diff --git a/source/system/dataexch.cpp b/source/system/dataexch.cpp index b647e1ec..dc52f293 100644 --- a/source/system/dataexch.cpp +++ b/source/system/dataexch.cpp @@ -195,7 +195,7 @@ namespace nana{ namespace system{ memcpy(addr, buf, size); ::GlobalUnlock(g); - unsigned data_format; + unsigned data_format = 0; switch(fmt) { case format::text: data_format = CF_UNICODETEXT; break; @@ -239,7 +239,7 @@ namespace nana{ namespace system{ #if defined(NANA_WINDOWS) if(::OpenClipboard(::GetFocus())) { - unsigned data_format; + unsigned data_format = 0; switch(fmt) { case format::text: data_format = CF_UNICODETEXT; break; diff --git a/source/unicode_bidi.cpp b/source/unicode_bidi.cpp index b98c6f29..3da7d2f0 100644 --- a/source/unicode_bidi.cpp +++ b/source/unicode_bidi.cpp @@ -515,7 +515,7 @@ namespace nana cur.level = _m_paragraph_level(str, end); //First character type - bidi_char begin_char_type; + bidi_char begin_char_type = {}; const char_type * begin_character = nullptr; for(const char_type * c = str; c < end; ++c) @@ -616,7 +616,7 @@ namespace nana e.bidi_char_type = bidi_char_type; } - + std::vector::iterator unicode_bidi::_m_search_first_character() { return levels_.begin(); @@ -811,7 +811,7 @@ namespace nana //N1. A sequence of neutrals takes the direction of the surrounding strong text if the text on both sides has the same direction. //European and Arabic numbers act as if they were R in terms of their influence on neutrals. //Start-of-level-run (sor) and end-of-level-run (eor) are used at level run boundaries. - bidi_char left; + bidi_char left = {}; for(auto i = begin_character; i != end; ++i) { if(level_of_run != i->level)