diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2007-04-26 10:07:02 +0000 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2007-04-26 10:07:02 +0000 |
commit | eb33a8a351734f477ba85d0c941aca96df0eae6a (patch) | |
tree | ccc5a213d7a9b315bc40b2a473d2a2242909d3d7 | |
parent | 0c0860570b6008c88803d96a9794ced60c26ff9d (diff) | |
download | mailfromd-eb33a8a351734f477ba85d0c941aca96df0eae6a.tar.gz mailfromd-eb33a8a351734f477ba85d0c941aca96df0eae6a.tar.bz2 |
Shut up gcc warnings and fix minor issues
git-svn-id: file:///svnroot/mailfromd/trunk@1383 7a8a7f39-df28-0410-adc6-e0d955640f24
-rw-r--r-- | doc/gacopyz.texi | 6 | ||||
-rw-r--r-- | gacopyz/gacopyz.h | 1 | ||||
-rw-r--r-- | src/bi_dns.m4 | 5 | ||||
-rw-r--r-- | src/bi_poll.m4 | 2 | ||||
-rw-r--r-- | src/db.c | 7 | ||||
-rw-r--r-- | src/debug.cin | 1 | ||||
-rw-r--r-- | src/debug.hin | 1 | ||||
-rw-r--r-- | src/drivers.c | 7 | ||||
-rw-r--r-- | src/gram.y | 7 | ||||
-rw-r--r-- | src/lex.l | 3 | ||||
-rw-r--r-- | src/mailfromd.h | 2 | ||||
-rw-r--r-- | src/mtasim.c | 6 | ||||
-rw-r--r-- | src/mu_dbm.c | 7 | ||||
-rw-r--r-- | src/prog.c | 2 | ||||
-rw-r--r-- | src/prog.h | 1 |
15 files changed, 20 insertions, 38 deletions
diff --git a/doc/gacopyz.texi b/doc/gacopyz.texi index 79745f52..eadb788f 100644 --- a/doc/gacopyz.texi +++ b/doc/gacopyz.texi @@ -36,9 +36,9 @@ new and more flexible API. The old API is supported for compatibility with @command{libmilter}. The library name comes from the song @samp{Rozprawa o robokach} by -Kazimierz Grzeskowiak. The phrase @samp{A to nie je mysa, ino -gacopyz} exactly describes what the library is: @samp{That is no -libmilter, but gacopyz}. +@uref{http://gray.gnu.org.ua/grzeskowiak.html, Kazimierz Grzeskowiak}. +The phrase @samp{A to nie je mysa, ino gacopyz} exactly describes what +the library is: @samp{That is no libmilter, but gacopyz}. Future versions of the documentation will include the detailed API description. diff --git a/gacopyz/gacopyz.h b/gacopyz/gacopyz.h index 3b2e470a..578f25d4 100644 --- a/gacopyz/gacopyz.h +++ b/gacopyz/gacopyz.h @@ -336,6 +336,7 @@ void gacopyz_srv_iterate_macros (gacopyz_srv_t srv, void gacopyz_srv_count_macros (gacopyz_srv_t srv, size_t *count); int gacopyz_srv_connect (gacopyz_srv_t srv); int gacopyz_srv_init(gacopyz_srv_t srv); +int gacopyz_srv_negotiate(gacopyz_srv_t srv); int gacopyz_srv_helo (gacopyz_srv_t p, const char *domain); int gacopyz_srv_envfrom (gacopyz_srv_t p, char **argv); diff --git a/src/bi_dns.m4 b/src/bi_dns.m4 index cf3e2657..657fef90 100644 --- a/src/bi_dns.m4 +++ b/src/bi_dns.m4 @@ -72,8 +72,6 @@ ipaddr_cmp(const void *a, const void *b) MF_DEFUN(dns_getaddr, STRING, STRING string) { - char *ipstr; - mf_status stat; GACOPYZ_UINT32_T ipbuf[64]; /* FIXME: arbitrary limit */ size_t i, ipcount; unsigned long ttl; @@ -127,7 +125,7 @@ MF_DEFUN(dns_getname, STRING, STRING ipstr) dns_status dnstat; struct in_addr addr; unsigned long ttl; - char *names[64], **p; + char *names[64]; MF_ASSERT(inet_aton(ipstr, &addr), mf_invip, @@ -199,7 +197,6 @@ MF_DEFUN(getmx, STRING, STRING domain, OPTIONAL, NUMBER resolve) { mxbuf_t mxbuf; mf_status mxstat; - int i; if (MF_DEFINED(resolve)) mxstat = getmxip(domain, mxbuf); diff --git a/src/bi_poll.m4 b/src/bi_poll.m4 index d9f1eeeb..bea8c072 100644 --- a/src/bi_poll.m4 +++ b/src/bi_poll.m4 @@ -26,8 +26,6 @@ set_last_poll_result(eval_environ_t env, const char *host_addr, const char *send, const char *recv) { - size_t s; - MF_VAR_SET_STRING(last_poll_host, host_addr); MF_VAR_SET_STRING(last_poll_send, send); MF_VAR_SET_STRING(last_poll_recv, recv); @@ -156,9 +156,6 @@ int db_list(char *dbname, db_item_printer_t fun) { DBM_FILE db; - DBM_DATUM key, prev, contents; - int rc = 0; - int res; if (mu_dbm_open(dbname, &db, MU_STREAM_READ, 0600, NULL)) { mu_error("mu_dbm_open(%s) failed: %s", dbname, @@ -193,13 +190,12 @@ int db_expire(char *dbname, db_expire_t fun) { DBM_FILE db; - DBM_DATUM key, contents; + DBM_DATUM key; struct expire_data ed; size_t size; char *base, *p; size_t i; int rc = 0; - int res; if (mu_dbm_open(dbname, &db, MU_STREAM_RDWR, 0600, NULL)) { mu_error("mu_dbm_open(%s) failed: %s", dbname, @@ -345,7 +341,6 @@ db_compact_func(DBM_DATUM key, DBM_DATUM contents, void *data) int db_compact(char *dbname, db_expire_t fun) { - DBM_DATUM key, contents; DBM_FILE odb; char *tmpname; struct compact_data dat; diff --git a/src/debug.cin b/src/debug.cin index 78696136..9e51264b 100644 --- a/src/debug.cin +++ b/src/debug.cin @@ -51,7 +51,6 @@ static int find_module(const char *name) { size_t len, i; - struct modinfo *mp; const char *q; const char *p; diff --git a/src/debug.hin b/src/debug.hin index da7bcbd0..a7309f72 100644 --- a/src/debug.hin +++ b/src/debug.hin @@ -23,6 +23,7 @@ void debug_enable_module(const char *file, int level); int debug_module_level(const char *modname, int *plev); void debug_parse_spec(const char *spec); void debug_log(char *fmt, ...); +int debug_spec_string(const char *spec, char **pbuf); #ifndef MF_SOURCE_NAME # define MF_SOURCE_NAME 0 diff --git a/src/drivers.c b/src/drivers.c index 0868f110..cc5f3610 100644 --- a/src/drivers.c +++ b/src/drivers.c @@ -664,7 +664,7 @@ optimize_type_bin(NODE *node) void code_type_bin(NODE *node, struct locus **old_locus) { - prog_counter_t pos1, pos2, endpos; + prog_counter_t pos1, pos2; code_node(node->v.bin.arg[0]); @@ -1263,8 +1263,6 @@ mark_type_regex(NODE *node) void code_type_regex(NODE *node, struct locus **old_locus) { - prog_counter_t ctr; - code_op(opcode_regex); code_immediate((void*)node->v.regex->index); } @@ -1848,7 +1846,6 @@ find_loop(struct literal *lit, struct loop_stack *pret) else if (!lit) return mf_stack_peek(loop_stack, 0, pret) == 0; else { - int rc; struct loop_stack ent; if (!pret) pret = &ent; @@ -2169,7 +2166,6 @@ optimize_type_funcdecl(NODE *node) void code_type_funcdecl(NODE *node, struct locus **old_locus) { - enum smtp_state tag; prog_counter_t pc; func = node->v.funcdecl.func; @@ -2213,7 +2209,6 @@ void code_type_progdecl(NODE *node, struct locus **old_locus) { enum smtp_state tag; - prog_counter_t pc; tag = node->v.progdecl.tag; root_node[tag] = node->v.progdecl.tree; @@ -2232,7 +2232,6 @@ optimize_node(NODE *node) if (!node) error_count++; else { - static struct locus *old_locus; struct node_drv *nd = find_node_drv(node->type); if (nd->optimize) nd->optimize(node); @@ -2272,7 +2271,6 @@ mark_node(NODE *node) if (!node) error_count++; else { - static struct locus *old_locus; struct node_drv *nd = find_node_drv(node->type); if (nd->mark) nd->mark(node); @@ -3247,6 +3245,10 @@ node_type(NODE *node) case node_type_funcdecl: case node_type_progdecl: case node_type_noop: + case node_type_next: + case node_type_break: + case node_type_loop: + case max_node_type: break; } return dtype_unspecified; @@ -3547,7 +3549,6 @@ static int _ds_variable_fun(void *sym, void *data) { struct variable *var = sym; - size_t *offset = data; if (!(var->flags & VAR_VOLATILE) && (var->flags & VAR_REFERENCED)) var->off = variable_count++; @@ -305,9 +305,6 @@ int try_file(const char *name, int allow_cwd, char **newp) { static char *cwd = "."; - char *tmp = NULL; - char *p = NULL; - struct file_data fd; fd.name = name; diff --git a/src/mailfromd.h b/src/mailfromd.h index 7b2f2f79..ace58e88 100644 --- a/src/mailfromd.h +++ b/src/mailfromd.h @@ -126,6 +126,7 @@ enum smtp_state { #define NUMERIC_BUFSIZE_BOUND INT_BUFSIZE_BOUND(long) +mf_status dns_to_mf_status(dns_status stat); mf_status resolve_ipstr(const char *ipstr, char **hbuf); mf_status resolve_ipstr_domain(const char *ipstr, const char *domain, @@ -609,6 +610,7 @@ struct rt_regex { }; void register_regex(struct sym_regex *rp); +void finalize_regex(void); /* Parser functions */ int yyparse(); diff --git a/src/mtasim.c b/src/mtasim.c index c2313806..4cc12c51 100644 --- a/src/mtasim.c +++ b/src/mtasim.c @@ -61,6 +61,7 @@ #include <dirent.h> #ifdef HAVE_READLINE_READLINE_H # include <readline/readline.h> +# include <readline/history.h> #endif #include <pwd.h> @@ -110,6 +111,7 @@ int mta_stdio (void); void error (const char *, ...); void smtp_reply (int, char *, ...); void reset_capa (char *); +void shell_help (void); void shell (int argc, char **argv); int define_macro (char *arg); @@ -188,8 +190,6 @@ free_expected_code () int set_expected_code (const char *str) { - int i; - if (strlen (str) != 3 || !strchr ("12345", str[0]) || !isdigit (str[1]) @@ -688,7 +688,7 @@ main (int argc, char **argv) mask |= SMI_LOG_MASK (SMI_LOG_DEBUG); gacopyz_set_logger (gacopyz_stderr_log_printer); - + if (strcmp (milter_port, "auto") == 0) start_mailfromd (argc, argv); diff --git a/src/mu_dbm.c b/src/mu_dbm.c index ae6e65b5..1fe69099 100644 --- a/src/mu_dbm.c +++ b/src/mu_dbm.c @@ -284,6 +284,7 @@ lock_file (const char *name, int fd, int type) #define LOCK_SUFFIX ".lock" +#ifndef DB_FCNTL_LOCKING static int make_lockfile (char *name, int lktype, int *pfd, char **plockname) { @@ -330,7 +331,7 @@ make_lockfile (char *name, int lktype, int *pfd, char **plockname) *pfd = fd; return 0; } - +#endif static void mu_dbm_errcall_fcn (const char *errpfx, char *msg) @@ -346,9 +347,7 @@ mu_dbm_open (char *name, DBM_FILE *dbm, int flags, int mode, int *ro) { int f = 0; DB *db = NULL; - char *lockname = NULL; int oflags; - int lktype; mu_dbm_errno = mu_check_perm (name, mode); @@ -537,7 +536,6 @@ int mu_dbm_firstkey (DBM_FILE *db, DBM_DATUM *pkey) { DBT data; - int ret; memset(pkey, 0, sizeof *pkey); memset(&data, 0, sizeof data); @@ -568,7 +566,6 @@ int mu_dbm_nextkey (DBM_FILE *db, DBM_DATUM prevkey /*unused*/, DBM_DATUM *pkey) { DBT data; - int ret; memset(pkey, 0, sizeof *pkey); memset(&data, 0, sizeof data); @@ -1136,7 +1136,6 @@ void instr_regcomp(eval_environ_t env) { int v; - regex_t *re; char buffer[REGEX_STRING_BUFSIZE]; size_t expr_off = (size_t)get_arg(env, 0); char *expr = get_string_arg(env, 0); @@ -2064,7 +2063,6 @@ dict_getsym(void *data, char *str) static void init_dataseg(STKVAL *dseg) { - size_t i; memcpy(dseg, dataseg, datasize * sizeof dataseg[0]); } @@ -47,6 +47,7 @@ void pushs(eval_environ_t env, char *s); void advance_pc(eval_environ_t env, unsigned cnt); void adjust_stack(eval_environ_t env, unsigned cnt); void prog_trace(eval_environ_t env, const char *fmt, ...); +void runtime_stack_trace(eval_environ_t env); void env_var_inc(eval_environ_t env, size_t off); char *env_dict_getsym(eval_environ_t env, char *string); char *env_dict_install(eval_environ_t env, char *key, char *value); |