]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
global: Add initializer for event in var_expand_params where needed
authorAki Tuomi <aki.tuomi@open-xchange.com>
Thu, 16 Jan 2025 07:20:27 +0000 (09:20 +0200)
committerAki Tuomi <aki.tuomi@open-xchange.com>
Fri, 17 Jan 2025 08:40:02 +0000 (10:40 +0200)
This makes gcc happy in bullseye.

src/auth/test-auth-cache.c
src/lib-var-expand/test-var-expand.c
src/master/service-process.c
src/pop3/pop3-commands.c
src/stats/stats-metrics.c
src/stats/stats-settings.c

index 1d7c5ec48f1f3c97d3b5b4b44b5582451a6777d7..46836defc6de0cadef3f9919a14b9a15196fe640 100644 (file)
@@ -49,7 +49,7 @@ static int mock_get_userdb(const char *key, const char **value_r,
 }
 
 int auth_request_var_expand_with_table(string_t *dest, const char *str,
-                                      const struct auth_request *auth_request ATTR_UNUSED,
+                                      const struct auth_request *auth_request,
                                       const struct var_expand_table *table ATTR_UNUSED,
                                       auth_request_escape_func_t *escape_func ATTR_UNUSED,
                                       const char **error_r ATTR_UNUSED)
@@ -61,6 +61,7 @@ int auth_request_var_expand_with_table(string_t *dest, const char *str,
                        { .key = "userdb", .func = mock_get_userdb },
                        VAR_EXPAND_TABLE_END
                },
+               .event = auth_request->event,
        };
        return var_expand(dest, str, &params, error_r);
 }
index e7238c23a4eb31f0f9aa280273d339cc7c793699..138d253aa29383dbe2eda9177110b0901cab60d9 100644 (file)
@@ -537,6 +537,7 @@ static void test_var_expand_provider_arr(void)
                        "context2",
                        VAR_EXPAND_CONTEXTS_END
                },
+               .event = NULL,
        };
 
        run_var_expand_tests(&params, tests, N_ELEMENTS(tests));
@@ -756,6 +757,7 @@ static void test_var_expand_value_func_arr(void)
                        "test2",
                        VAR_EXPAND_CONTEXTS_END
                },
+               .event = NULL,
        };
 
        test_begin("var_expand(value func_arr)");
@@ -898,6 +900,8 @@ static void test_var_expand_perc(void)
                        { .key = "test", .value = "value" },
                        VAR_EXPAND_TABLE_END
                },
+               .event = NULL,
+
        };
 
        run_var_expand_tests(&params, tests, N_ELEMENTS(tests));
@@ -975,6 +979,7 @@ static void test_var_expand_export_import(void)
                        { .key = "test", .value = "tset" },
                        VAR_EXPAND_TABLE_END
                },
+               .event = NULL,
        };
 
        const struct test_case {
index dd36978749b5c2f0c5b7a5c87e27f1d9c8553fc8..02d735e5c295e102d1607407f61ff2b65ab6dcdc 100644 (file)
@@ -61,6 +61,7 @@ service_unix_pid_listener_get_path(struct service_listener *l, pid_t pid,
                        { .key = "pid", .value = dec2str(pid) },
                        VAR_EXPAND_TABLE_END
                },
+               .event = l->service->event,
        };
 
        str_truncate(path, 0);
index 09adba747d419185b9a8cc9c21df96d68529ff1f..026b4d401e245c998adaa2d602395bacef4e0afc 100644 (file)
@@ -677,6 +677,7 @@ pop3_get_uid(struct client *client, struct mail *mail, string_t *str,
                        { .key = "guid", .value = guid },
                        VAR_EXPAND_TABLE_END
                },
+               .event = client->event,
        };
        const char *error;
 
index f9a50ca1eb798c75f7e14db66ef697bb45df0158..4e0e46ae0e7fb83215256d9ad2771fd294a3f138 100644 (file)
@@ -601,6 +601,7 @@ label_by_mod_str(const struct stats_metric_settings_group_by *group_by,
                        { .key = "value", .value = value },
                        VAR_EXPAND_TABLE_END
                },
+               .event = NULL,
        };
        string_t *str = t_str_new(128);
        if (var_expand(str, group_by->discrete_modifier, &params, &error) < 0) {
index 66f8b223a416da14f17df47752a66db0f48b7bb8..6fe62f85c732e04471f6f88f64c0e3a4abf81b57 100644 (file)
@@ -471,6 +471,7 @@ parse_metric_group_by_mod(pool_t pool,
                        { .key ="value", .value = "" },
                        VAR_EXPAND_TABLE_END
                },
+               .event = NULL,
        };
        const char *error;
        string_t *str = t_str_new(128);