Advanced programmers advice needed.

maybe I have not been all to clear about the nature of the problem.
Sometimes with the same sketch (no new upload) it works and then it stops working.
When it stops working it is after a cold start. When I simply reset the leonardo the behaviour seems to be is consistent. When I cold start it is not.
Which is pretty annoying as I go to sleep happy that it works and when I start the next day .......

This behaviour makes me think more in the area of uninitialize variables. However with -wall these are marked and -even though they do cost program memory- I have initialized all variables in my code.
Removing the invalid PROGMEM warnings below all the warnings that remain in my sketch when compiled with -wall

Description	Resource	Path	Location	Type
"USB_MANUFACTURER" redefined	USBCore.cpp	/batterijlader/arduino/core	line 59	C/C++ Problem
unused variable ‘current_config’	HardwareSerial.cpp	/batterijlader/arduino/core	line 329	C/C++ Problem
unused variable ‘c’	HardwareSerial.cpp	/batterijlader/arduino/core	line 115	C/C++ Problem
#warning this may not be correct	Tone.cpp	/batterijlader/arduino/core	line 210	C/C++ Problem
unused variable ‘r’	HID.cpp	/batterijlader/arduino/core	line 514	C/C++ Problem
#warning Timer 2 not finished (may not be present on this CPU)	wiring.c	/batterijlader/arduino/core	line 274	C/C++ Problem
unused variable ‘zero’	USBCore.cpp	/batterijlader/arduino/core	line 270	C/C++ Problem
#warning Timer 2 not finished (may not be present on this CPU)	wiring.c	/batterijlader/arduino/core	line 265	C/C++ Problem

Now I'm looking at this list I see this warning "#warning Timer 2 not finished (may not be present on this CPU)"
This is the code it points to

	// set timer 2 prescale factor to 64
#if defined(TCCR2) && defined(CS22)
	sbi(TCCR2, CS22);
#elif defined(TCCR2B) && defined(CS22)
	sbi(TCCR2B, CS22);
#else
	#warning Timer 2 not finished (may not be present on this CPU)
#endif

	// configure timer 2 for phase correct pwm (8-bit)
#if defined(TCCR2) && defined(WGM20)
	sbi(TCCR2, WGM20);
#elif defined(TCCR2A) && defined(WGM20)
	sbi(TCCR2A, WGM20);
#else
	#warning Timer 2 not finished (may not be present on this CPU)
#endif

Which is part of init() which is being called before setup. This feels like a lead.
I guess I best open an issue/thread on this one in the yun specific locations and try to remove the wire usage and see what that gives.

An update on the code on github.
Github decide to update their windows client to use .net4. Moreover they decided to update my installation which runs on XP without my permission. After upgrading my xp to the very latest version (I had turned off auto update for very good reasons) I found out .net4 is not supported on xp.

Best regards
Jantje