This avoids an possible undeclared variable error five lines later if remain is
never set: "if(remain<2250)".

Patch from Debian [1].

[1] 
http://sources.debian.net/src/wmcdplay/1.0beta1-13/debian/patches/set_remain_to_zero.patch/
---
 wmcdplay/wmcdplay.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/wmcdplay/wmcdplay.cc b/wmcdplay/wmcdplay.cc
index 6e0c21d..1d776f3 100644
--- a/wmcdplay/wmcdplay.cc
+++ b/wmcdplay/wmcdplay.cc
@@ -485,7 +485,7 @@ void checkStatus(bool forced){
             drawText(art_ledpos[1][0], art_ledpos[1][1], trackstr);
       }
       if(mode==ssPlaying || mode==ssPaused || mode==ssStopped){
-         int remain;
+         int remain = 0;
          if(tdisplay==0)
             remain=cdctl->getTrackLen(cdctl->getStatusTrack())-pos;
          if(tdisplay==1)
-- 
2.1.0


-- 
To unsubscribe, send mail to wmaker-dev-unsubscr...@lists.windowmaker.org.

Reply via email to