(svn r8963) [cpp_gui] -Fix: g++ 3.4.2 warning: 'w' might be used uninitialized in this function (glx) cpp_gui
authorKUDr
Thu, 01 Mar 2007 23:34:28 +0000
branchcpp_gui
changeset 6272 43637acd46b5
parent 6271 0ad100a98853
child 6273 d8a2c6844650
(svn r8963) [cpp_gui] -Fix: g++ 3.4.2 warning: 'w' might be used uninitialized in this function (glx)
src/window.cpp
--- a/src/window.cpp	Thu Mar 01 22:48:46 2007 +0000
+++ b/src/window.cpp	Thu Mar 01 23:34:28 2007 +0000
@@ -1401,7 +1401,7 @@
 
 static void DecreaseWindowCounters(void)
 {
-	BaseWindow *w;
+	BaseWindow *w = NULL;
 	REVERSED_FOR_ALL_WINDOWS(w) {
 		// Unclick scrollbar buttons if they are pressed.
 		if (w->flags4 & (WF_SCROLL_DOWN | WF_SCROLL_UP)) {
@@ -1605,7 +1605,7 @@
 	if (!_scrolling_scrollbar) return true;
 
 	// Find the scrolling window
-	BaseWindow *w;
+	BaseWindow *w = NULL;
 	FOR_ALL_WINDOWS(w) {
 		if (w->flags4 & WF_SCROLL_MIDDLE) {
 			// Abort if no button is clicked any more.