From f406a05446ac644829d7791b2bc829af8293e651 Mon Sep 17 00:00:00 2001
From: Fabian Keil <fk@fabiankeil.de>
Date: Sat, 19 Dec 2020 16:59:48 +0100
Subject: [PATCH] action_render_string_filters_template(): Declare a variable
 at the beginning

... of the function to silence a compiler warning when building with -std=c89:

   cc -c -pipe -fstack-protector-all -ggdb -Wshadow  -Wconversion -I/usr/local/include/  -pthread -Wall -std=c89   cgiedit.c -o cgiedit.o
   cgiedit.c:4436:9: warning: GCC does not allow variable declarations in for loop initializers before C99 [-Wgcc-compat]
      for (int i=0; i < SZ(desc); ++i)
           ^
   1 warning generated.
---
 cgiedit.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/cgiedit.c b/cgiedit.c
index af22d071..e979ebc3 100644
--- a/cgiedit.c
+++ b/cgiedit.c
@@ -4421,6 +4421,7 @@ static jb_err action_render_string_filters_template(struct map * exports,
 {
    jb_err err = JB_ERR_OK;
    int filter_identifier = 0;
+   int i;
    char *prepared_template = strdup("");
 
    struct action_multi {
@@ -4433,7 +4434,7 @@ static jb_err action_render_string_filters_template(struct map * exports,
        { 'n', action->multi_remove[type->multi_action_index][0].first }
    };
 
-   for (int i=0; i < SZ(desc); ++i)
+   for (i = 0; i < SZ(desc); ++i)
    {
       const char radio = desc[i].radio;
       struct list_entry *entry = desc[i].list;
-- 
2.49.0