util: move variable declaration out of for-loop
authorBrian Paul <brianp@vmware.com>
Thu, 12 Dec 2013 18:08:49 +0000 (11:08 -0700)
committerBrian Paul <brianp@vmware.com>
Thu, 12 Dec 2013 18:09:02 +0000 (11:09 -0700)
To fix MSVC build.

src/gallium/auxiliary/util/u_blitter.c

index 710a72811c5b97447924dc70aa70a48a84bba68d..9591fc439cb4141c5462ef27019cb5a0d4ce4fbc 100644 (file)
@@ -993,9 +993,11 @@ static void *get_clear_blend_state(struct blitter_context_priv *ctx,
    /* Create a new one. */
    {
       struct pipe_blend_state blend = {0};
+      unsigned i;
+
       blend.independent_blend_enable = 1;
 
-      for (int i = 0; i < PIPE_MAX_COLOR_BUFS; i++) {
+      for i = 0; i < PIPE_MAX_COLOR_BUFS; i++) {
          if (clear_buffers & (PIPE_CLEAR_COLOR0 << i)) {
             blend.rt[i].colormask = PIPE_MASK_RGBA;
          }