<br><br><div class="gmail_quote">2010/11/14 Nikolay Sivov <span dir="ltr"><<a href="mailto:nsivov@codeweavers.com">nsivov@codeweavers.com</a>></span><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
On 11/14/2010 22:17, David Adam wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
if(wined3d_settings.rendertargetlock_mode == RTL_DISABLE) {<br>
- static BOOL warned = FALSE;<br>
- if(!warned) {<br>
- ERR("The application tries to lock the render target, but render target locking is disabled\n");<br>
- warned = TRUE;<br>
- }<br>
+ ERR("The application tries to lock the render target, but render target locking is disabled\n");<br>
return;<br>
}<br>
</blockquote>
Why is it useless?<br></blockquote><div><br>Maybe I missed something:<br><br>Since warned= False we always enter in the if condition. Then warned=TRUE. But we leave the first if condition that is the lifetime of the variable. So the variable is destroyed ans is useless.<br>
<br>Am I wrong?<br><br>A+<br><br>David<br></div></div><br>