diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2013-10-15 20:36:11 +0300 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2013-10-15 20:36:11 +0300 |
commit | 2afd00cc2bdbaa401edc7117965b3db658576719 (patch) | |
tree | 8cfa0a8bc1059ebef7babde9466fe146abe2ee94 /src | |
parent | 7d0beb6599c53544739409ca4aec104bf27a3f35 (diff) | |
download | vmod-binlog-2afd00cc2bdbaa401edc7117965b3db658576719.tar.gz vmod-binlog-2afd00cc2bdbaa401edc7117965b3db658576719.tar.bz2 |
Fix compiler warnings.
Diffstat (limited to 'src')
-rw-r--r-- | src/binlog.c | 2 | ||||
-rw-r--r-- | src/binlogcat.c | 3 | ||||
-rw-r--r-- | src/binlogsel.c | 6 | ||||
-rw-r--r-- | src/pack.c | 2 |
4 files changed, 5 insertions, 8 deletions
diff --git a/src/binlog.c b/src/binlog.c index e7ac7e5..ea1aa65 100644 --- a/src/binlog.c +++ b/src/binlog.c @@ -462,13 +462,13 @@ reset(struct binlog_config *conf) conf->fd = -1; conf->base = NULL; conf->recbase = NULL; conf->recnum = 0; } -static int +static void setstoptime(struct binlog_config *conf) { time_t ts; ts = time(NULL); conf->stoptime = ts - ts % conf->interval + conf->interval; diff --git a/src/binlogcat.c b/src/binlogcat.c index ada8efe..6ab3daf 100644 --- a/src/binlogcat.c +++ b/src/binlogcat.c @@ -83,13 +83,14 @@ catlog(const char *fname) fname, strerror(errno)); exit(1); } if (verbose_option) printf("# %s; format=%s; recsize=%lu; recnum=%lu\n", - fname, dataspec, header.recsize, header.recnum); + fname, dataspec, (unsigned long) header.recsize, + (unsigned long) header.recnum); inst = packcomp(dataspec, &p); if (!inst) { if (errno == EINVAL) { error("%s: %s: bad dataspec near %s", fname, dataspec, p); exit(1); diff --git a/src/binlogsel.c b/src/binlogsel.c index b05b12c..e095347 100644 --- a/src/binlogsel.c +++ b/src/binlogsel.c @@ -175,13 +175,14 @@ selmem(const char *name, void *base) } dataspec = (char*)(hdr + 1); if (verbose_option) printf("# %s; format=%s; recsize=%lu; recnum=%lu\n", - name, dataspec, hdr->recsize, hdr->recnum); + name, dataspec, (unsigned long) hdr->recsize, + (unsigned long) hdr->recnum); inst = packcomp(dataspec, &p); if (!inst) { if (errno == EINVAL) { error("%s: %s: bad dataspec near %s", name, dataspec, p); @@ -384,13 +385,12 @@ filename_to_int(char *name) } void selidx_day(const char *dir) { int from_day, to_day; - struct tm *tm; glob_t gl; int glinit = 0; char *dirbuf; size_t dirlen; if (index_type == index_month) { @@ -435,13 +435,12 @@ selidx_day(const char *dir) } void selidx_month(const char *dir) { int from_month, to_month; - struct tm *tm; glob_t gl; int glinit = 0; char *dirbuf; size_t dirlen; if (index_type == index_year) { @@ -486,13 +485,12 @@ selidx_month(const char *dir) } void selidx_year(const char *dir) { int from_year, to_year; - struct tm *tm; glob_t gl; int glinit = 0; char *dirbuf; size_t dirlen; if (timemask & FROM_TIME) @@ -738,14 +738,12 @@ packin(struct packinst *pi, struct packenv *env) } } struct packinst * packinnext(struct packinst *pi, struct packenv *env) { - int i; - if (!pi) return NULL; if (pi->spec->flags & F_REP) pi->spec->packer(env, pi->rep); else { pi->spec->packer(env, 1); |