fr_sbuff_t sbuff = FR_SBUFF_IN(in, inlen);
ssize_t slen;
command_tmpl_rule_func func;
+ void *res;
static fr_table_ptr_sorted_t tmpl_rule_func_table[] = {
{ L("allow_foreign"), (void *)command_tmpl_rule_allow_foreign },
while (fr_sbuff_extend(&sbuff)) {
fr_sbuff_adv_past_whitespace(&sbuff, SIZE_MAX, NULL);
- fr_sbuff_out_by_longest_prefix(&slen, &func, tmpl_rule_func_table, &sbuff, NULL);
- if (func == NULL) {
+ fr_sbuff_out_by_longest_prefix(&slen, &res, tmpl_rule_func_table, &sbuff, NULL);
+ if (res == NULL) {
fr_strerror_printf("Specified rule \"%pV\" is invalid",
fr_box_strvalue_len(fr_sbuff_current(&sbuff), fr_sbuff_remaining(&sbuff)));
RETURN_COMMAND_ERROR();
}
+ func = (command_tmpl_rule_func)res; /* -Wpedantic */
fr_sbuff_adv_past_whitespace(&sbuff, SIZE_MAX, NULL);
return compile_tmpl(parent, unlang_ctx, cp);
}
- compile = fr_table_value_by_str(unlang_pair_keywords, name, NULL);
+ compile = (unlang_op_compile_t)fr_table_value_by_str(unlang_pair_keywords, name, NULL); /* Cast for -Wpedantic */
if (compile) return compile(parent, unlang_ctx, ci);
/*