Skip to content
Snippets Groups Projects
Commit 6cc8c323 authored by Stephan Bosch's avatar Stephan Bosch
Browse files

Fixed series of AIX compiler warnings.

parent 7be6741e
No related branches found
No related tags found
No related merge requests found
...@@ -247,7 +247,7 @@ static bool tag_body_transform_generate ...@@ -247,7 +247,7 @@ static bool tag_body_transform_generate
static bool ext_body_operation_dump static bool ext_body_operation_dump
(const struct sieve_dumptime_env *denv, sieve_size_t *address) (const struct sieve_dumptime_env *denv, sieve_size_t *address)
{ {
enum tst_body_transform transform; unsigned int transform;
int opt_code = 0; int opt_code = 0;
sieve_code_dumpf(denv, "BODY"); sieve_code_dumpf(denv, "BODY");
...@@ -307,7 +307,7 @@ static int ext_body_operation_execute ...@@ -307,7 +307,7 @@ static int ext_body_operation_execute
SIEVE_COMPARATOR_DEFAULT(i_ascii_casemap_comparator); SIEVE_COMPARATOR_DEFAULT(i_ascii_casemap_comparator);
struct sieve_match_type mcht = struct sieve_match_type mcht =
SIEVE_MATCH_TYPE_DEFAULT(is_match_type); SIEVE_MATCH_TYPE_DEFAULT(is_match_type);
enum tst_body_transform transform = TST_BODY_TRANSFORM_TEXT; unsigned int transform = TST_BODY_TRANSFORM_TEXT;
struct sieve_stringlist *ctype_list, *value_list, *key_list; struct sieve_stringlist *ctype_list, *value_list, *key_list;
bool mvalues_active; bool mvalues_active;
const char * const *content_types = NULL; const char * const *content_types = NULL;
...@@ -341,6 +341,7 @@ static int ext_body_operation_execute ...@@ -341,6 +341,7 @@ static int ext_body_operation_execute
(ret=sieve_opr_stringlist_read (ret=sieve_opr_stringlist_read
(renv, address, "content-type-list", &ctype_list)) <= 0 ) (renv, address, "content-type-list", &ctype_list)) <= 0 )
return ret; return ret;
break; break;
default: default:
...@@ -368,7 +369,8 @@ static int ext_body_operation_execute ...@@ -368,7 +369,8 @@ static int ext_body_operation_execute
sieve_runtime_trace(renv, SIEVE_TRLVL_TESTS, "body test"); sieve_runtime_trace(renv, SIEVE_TRLVL_TESTS, "body test");
/* Extract requested parts */ /* Extract requested parts */
value_list = ext_body_get_part_list(renv, transform, content_types); value_list = ext_body_get_part_list
(renv, (enum tst_body_transform) transform, content_types);
if ( value_list == FALSE ) if ( value_list == FALSE )
return SIEVE_EXEC_FAILURE; return SIEVE_EXEC_FAILURE;
......
...@@ -265,7 +265,7 @@ static bool ext_include_binary_open ...@@ -265,7 +265,7 @@ static bool ext_include_binary_open
for ( i = 0; i < depcount; i++ ) { for ( i = 0; i < depcount; i++ ) {
unsigned int inc_block_id; unsigned int inc_block_id;
struct sieve_binary_block *inc_block; struct sieve_binary_block *inc_block;
enum ext_include_script_location location; unsigned int location;
string_t *script_name; string_t *script_name;
const char *script_dir; const char *script_dir;
struct sieve_script *script; struct sieve_script *script;
......
...@@ -131,12 +131,12 @@ static bool _is_text_content(const struct message_header_line *hdr) ...@@ -131,12 +131,12 @@ static bool _is_text_content(const struct message_header_line *hdr)
/* Parse content type */ /* Parse content type */
content_type = t_str_new(64); content_type = t_str_new(64);
if (rfc822_parse_content_type(&parser, content_type) < 0) if (rfc822_parse_content_type(&parser, content_type) < 0)
return ""; return FALSE;
/* Content-type value must end here, otherwise it is invalid after all */ /* Content-type value must end here, otherwise it is invalid after all */
(void)rfc822_skip_lwsp(&parser); (void)rfc822_skip_lwsp(&parser);
if ( parser.data != parser.end && *parser.data != ';' ) if ( parser.data != parser.end && *parser.data != ';' )
return ""; return FALSE;
/* Success */ /* Success */
data = str_c(content_type); data = str_c(content_type);
......
...@@ -54,8 +54,7 @@ static bool ext_variables_variable_argument_activate ...@@ -54,8 +54,7 @@ static bool ext_variables_variable_argument_activate
arg->argument = sieve_argument_create(ast, &variable_argument, this_ext, 0); arg->argument = sieve_argument_create(ast, &variable_argument, this_ext, 0);
arg->argument->data = (void *) var; arg->argument->data = (void *) var;
return TRUE;
return arg;
} }
static struct sieve_ast_argument *ext_variables_variable_argument_create static struct sieve_ast_argument *ext_variables_variable_argument_create
......
...@@ -11,6 +11,15 @@ ...@@ -11,6 +11,15 @@
#include "sieve-common.h" #include "sieve-common.h"
#include "sieve-plugins.h" #include "sieve-plugins.h"
/*
* Types
*/
typedef void (*sieve_plugin_load_func_t)
(struct sieve_instance *svinst, void **context);
typedef void (*sieve_plugin_unload_func_t)
(struct sieve_instance *svinst, void *context);
struct sieve_plugin { struct sieve_plugin {
struct module *module; struct module *module;
...@@ -106,7 +115,7 @@ void sieve_plugins_load(struct sieve_instance *svinst, const char *path, const c ...@@ -106,7 +115,7 @@ void sieve_plugins_load(struct sieve_instance *svinst, const char *path, const c
for (i = 0; module_names[i] != NULL; i++) { for (i = 0; module_names[i] != NULL; i++) {
struct sieve_plugin *plugin; struct sieve_plugin *plugin;
const char *name = module_names[i]; const char *name = module_names[i];
void (*load_func)(struct sieve_instance *svinst, void **context); sieve_plugin_load_func_t load_func;
/* Find the module */ /* Find the module */
module = sieve_plugin_module_find(name); module = sieve_plugin_module_find(name);
...@@ -129,7 +138,7 @@ void sieve_plugins_load(struct sieve_instance *svinst, const char *path, const c ...@@ -129,7 +138,7 @@ void sieve_plugins_load(struct sieve_instance *svinst, const char *path, const c
plugin->module = module; plugin->module = module;
/* Call load function */ /* Call load function */
load_func = module_get_symbol load_func = (sieve_plugin_load_func_t) module_get_symbol
(module, t_strdup_printf("%s_load", module->name)); (module, t_strdup_printf("%s_load", module->name));
if ( load_func != NULL ) { if ( load_func != NULL ) {
load_func(svinst, &plugin->context); load_func(svinst, &plugin->context);
...@@ -162,9 +171,9 @@ void sieve_plugins_unload(struct sieve_instance *svinst) ...@@ -162,9 +171,9 @@ void sieve_plugins_unload(struct sieve_instance *svinst)
plugin = svinst->plugins; plugin = svinst->plugins;
while ( plugin != NULL ) { while ( plugin != NULL ) {
struct module *module = plugin->module; struct module *module = plugin->module;
void (*unload_func)(struct sieve_instance *svinst, void *context); sieve_plugin_unload_func_t unload_func;
unload_func = module_get_symbol unload_func = (sieve_plugin_unload_func_t)module_get_symbol
(module, t_strdup_printf("%s_unload", module->name)); (module, t_strdup_printf("%s_unload", module->name));
if ( unload_func != NULL ) { if ( unload_func != NULL ) {
unload_func(svinst, plugin->context); unload_func(svinst, plugin->context);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment

Consent

On this website, we use the web analytics service Matomo to analyze and review the use of our website. Through the collected statistics, we can improve our offerings and make them more appealing for you. Here, you can decide whether to allow us to process your data and set corresponding cookies for these purposes, in addition to technically necessary cookies. Further information on data protection—especially regarding "cookies" and "Matomo"—can be found in our privacy policy. You can withdraw your consent at any time.