Code::Blocks Forums
		Developer forums (C::B DEVELOPMENT STRICTLY!) => Development => Topic started by: tomjnx on January 05, 2013, 06:40:46 pm
		
			
			- 
				This trivial patch reduces the number of Valgrind "conditional jump depends on uninitialized value" warnings:
diff --git a/src/plugins/contrib/MouseSap/MouseSap.cpp b/src/plugins/contrib/MouseSap/MouseSap.cpp
index e611f18..dbf3a74 100644
--- a/src/plugins/contrib/MouseSap/MouseSap.cpp
+++ b/src/plugins/contrib/MouseSap/MouseSap.cpp
@@ -64,6 +64,7 @@ MouseSap* MouseSap::pMouseSap;
 
 // ----------------------------------------------------------------------------
 MouseSap::MouseSap()
+     : m_pMyLog(0), m_bEditorsAttached(false), m_bMouseSapEnabled(false), m_pMMSapEvents(0)
 // ----------------------------------------------------------------------------
 {
        //ctor
			 
			
			- 
				As far as I can see the patch is broken, also please use nullptr instead of 0 for pointers.
			
 
			
			- 
				
As far as I can see the patch is broken, also please use nullptr instead of 0 for pointers.
Ok, fixed. Also, this patch is probably too trivial to apply it using patch 8-)
diff --git a/src/plugins/contrib/MouseSap/MouseSap.cpp b/src/plugins/contrib/MouseSap/MouseSap.cpp
index e611f18..77bde4d 100644
--- a/src/plugins/contrib/MouseSap/MouseSap.cpp
+++ b/src/plugins/contrib/MouseSap/MouseSap.cpp
@@ -64,6 +64,7 @@ MouseSap* MouseSap::pMouseSap;
 
 // ----------------------------------------------------------------------------
 MouseSap::MouseSap()
+     : m_pMyLog(nullptr), m_bEditorsAttached(false), m_bMouseSapEnabled(false), m_pMMSapEvents(nullptr)
 // ----------------------------------------------------------------------------
 {
        //ctor
			 
			
			- 
				In SVN...
BTW: How long does it take to ryn cb under valgrind?
			 
			
			- 
				
BTW: How long does it take to ryn cb under valgrind?
Thanks a lot!
It takes approximately 90 seconds from invocation to display the main window on an:
Intel(R) Core(TM)2 Duo CPU     E8400  @ 3.00GHz
(with core plugins installed only)
Afterwards, editing is noticeably slower, but bearable for bug hunting...
			 
			
			- 
				Is this with optimized or debug builds?
			
 
			
			- 
				With
-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4  -m64 -mtune=generic
on Linux