[PATCH vkd3d 2/5] vkd3d-shader: Do not warn if a "for" initializer is empty.

Zebediah Figura zfigura at codeweavers.com
Fri Feb 12 14:38:47 CST 2021


It is perfectly valid.

Signed-off-by: Zebediah Figura <zfigura at codeweavers.com>
---
 libs/vkd3d-shader/hlsl.y | 2 --
 1 file changed, 2 deletions(-)

diff --git a/libs/vkd3d-shader/hlsl.y b/libs/vkd3d-shader/hlsl.y
index 2fda89e9..1bda8df2 100644
--- a/libs/vkd3d-shader/hlsl.y
+++ b/libs/vkd3d-shader/hlsl.y
@@ -2464,8 +2464,6 @@ loop_statement:
         }
     | KW_FOR '(' scope_start declaration expr_statement expr ')' statement
         {
-            if (!$4)
-                hlsl_warning(ctx, @4, "no expressions in for loop initializer");
             $$ = create_loop(LOOP_FOR, $4, $5, $6, $8, @1);
             hlsl_pop_scope(ctx);
         }
-- 
2.30.0




More information about the wine-devel mailing list