From b94e5910064bff47ecf8336c0340ace442bc38e4 Mon Sep 17 00:00:00 2001 From: Yuchen Deng Date: Sat, 14 Apr 2018 17:06:41 +0800 Subject: [PATCH 1/2] Fix uninitialized local variable warning --- source/system/dataexch.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/source/system/dataexch.cpp b/source/system/dataexch.cpp index 28674822..8c25ed5e 100644 --- a/source/system/dataexch.cpp +++ b/source/system/dataexch.cpp @@ -208,20 +208,20 @@ namespace nana{ namespace system{ memcpy(addr, buf, size); ::GlobalUnlock(g); - unsigned data_format; + unsigned data_format = CF_MAX; switch(fmt) { case format::text: data_format = CF_UNICODETEXT; break; case format::pixmap: data_format = CF_BITMAP; break; } - + res = (nullptr != ::SetClipboardData(data_format, g)); } ::CloseClipboard(); } #elif defined(NANA_X11) auto & spec = ::nana::detail::platform_spec::instance(); - + Atom atom_type; switch(fmt) { @@ -232,7 +232,7 @@ namespace nana{ namespace system{ spec.write_selection(owner, atom_type, buf, size); return true; - + #endif return res; } @@ -244,7 +244,7 @@ namespace nana{ namespace system{ #if defined(NANA_WINDOWS) if(::OpenClipboard(::GetFocus())) { - unsigned data_format; + unsigned data_format = CF_MAX; switch(fmt) { case format::text: data_format = CF_UNICODETEXT; break; From 19c0f719e23063e3ce56a0ccde1331b4a768e54f Mon Sep 17 00:00:00 2001 From: Yuchen Deng Date: Sat, 14 Apr 2018 18:31:29 +0800 Subject: [PATCH 2/2] Add build/install_manifest.txt to .gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index e5d2f0b7..6bd33ab0 100644 --- a/.gitignore +++ b/.gitignore @@ -8,6 +8,7 @@ bii/deps/* build/vc2013-bkl/* build/makefile-bkl/* build/compile_commands.json +build/install_manifest.txt *.obj *.exe *.pdb