tag:blogger.com,1999:blog-4265978215067218258.post6294240504998354595..comments2023-11-03T09:37:40.184+01:00Comments on I Get Your Fail: Giving New Meaning to Destructorsdephttp://www.blogger.com/profile/16229508667482062327noreply@blogger.comBlogger4125tag:blogger.com,1999:blog-4265978215067218258.post-43315117270335269102009-09-09T22:14:30.592+02:002009-09-09T22:14:30.592+02:00Looking back on this, it must have been a long day...Looking back on this, it must have been a long day for myself as well. Ignore my question, please :)Dave Powellhttps://www.blogger.com/profile/13329713003615093358noreply@blogger.comtag:blogger.com,1999:blog-4265978215067218258.post-67253214251050353382009-08-29T05:05:29.036+02:002009-08-29T05:05:29.036+02:00I'm ashamed to say it took me three readings t...I'm ashamed to say it took me three readings to notice that 'entry' wasn't initialized. In my defense, it's well past the end of my workday and I've had two glasses of wine :)<br /><br />I'm not sure I understand the question about semicolons. A 'for' statement always has two semicolons in it to delimit the three clauses, even if one or more of the clauses is missing. The code here follows that rule. I think adding more semicolons would just cause syntax errors.Jens Alfkehttps://www.blogger.com/profile/16216066893297831727noreply@blogger.comtag:blogger.com,1999:blog-4265978215067218258.post-74891922601735081942009-08-28T16:43:35.671+02:002009-08-28T16:43:35.671+02:00It doesn't need the third semi-colon for GCC o...It doesn't need the third semi-colon for GCC or Visual Studio, I am not sure what the standard says.Pat Wilsonhttps://www.blogger.com/profile/09248944074292458916noreply@blogger.comtag:blogger.com,1999:blog-4265978215067218258.post-82922647952601260182009-08-28T16:08:56.877+02:002009-08-28T16:08:56.877+02:00Hurray for uninitialized pointers.
On another not...Hurray for uninitialized pointers.<br /><br />On another note, anyone have thoughts on whether a for loop should have dummy semicolons if one/more of the three parts aren't used?<br /><br />In this case,<br /><i>for( LRUCacheEntry* entry = pFail; entry != NULL; <b>;</b> ) {...}</i>Dave Powellhttps://www.blogger.com/profile/13329713003615093358noreply@blogger.com