From: Vadim Zeitlin Date: Sun, 7 Jun 2009 12:29:39 +0000 (+0000) Subject: work around MSVC warnings about using uninitialized variables in optimized build X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/92981c938dee7e5de759b79186ca318e2d6bdc9a work around MSVC warnings about using uninitialized variables in optimized build git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60944 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/samples/console/console.cpp b/samples/console/console.cpp index b996573935..5165ec811f 100644 --- a/samples/console/console.cpp +++ b/samples/console/console.cpp @@ -520,8 +520,8 @@ static void TestDllListLoaded() const wxDynamicLibraryDetails& details = dlls[n]; printf("%-45s", (const char *)details.GetPath().mb_str()); - void *addr; - size_t len; + void *addr wxDUMMY_INITIALIZE(NULL); + size_t len wxDUMMY_INITIALIZE(0); if ( details.GetAddress(&addr, &len) ) { printf(" %08lx:%08lx", diff --git a/samples/scroll/scroll.cpp b/samples/scroll/scroll.cpp index f9adc6f43f..e30c5348d3 100644 --- a/samples/scroll/scroll.cpp +++ b/samples/scroll/scroll.cpp @@ -1240,7 +1240,7 @@ void MyAutoScrollingWindow::OnDraw(wxDC& dc) dc.SetPen(*wxTRANSPARENT_PEN); const wxString str = sm_testData; size_t strLength = str.length(); - wxString::const_iterator str_i; + wxString::const_iterator str_i = std.begin(); // draw the characters // 1. for each update region