From c0b6c5214c32ed8dab853791679999ebd3c9a469 Mon Sep 17 00:00:00 2001 From: didg Date: Tue, 21 Jul 2009 13:41:16 +0000 Subject: [PATCH 1/1] remove trivial warnings --- etc/afpd/afp_dsi.c | 4 ++-- etc/afpd/afp_options.c | 7 ++++--- etc/afpd/fork.c | 4 ++-- etc/cnid_dbd/cnid_metad.c | 4 ++-- include/atalk/adouble.h | 3 ++- libatalk/adouble/ad_attr.c | 4 ++-- libatalk/adouble/ad_flush.c | 4 ++-- libatalk/adouble/ad_open.c | 8 ++++---- libatalk/cnid/dbd/cnid_dbd.c | 4 ++-- 9 files changed, 22 insertions(+), 20 deletions(-) diff --git a/etc/afpd/afp_dsi.c b/etc/afpd/afp_dsi.c index 6765e81c..b9f45706 100644 --- a/etc/afpd/afp_dsi.c +++ b/etc/afpd/afp_dsi.c @@ -1,5 +1,5 @@ /* - * $Id: afp_dsi.c,v 1.36 2009-04-16 06:17:14 franklahm Exp $ + * $Id: afp_dsi.c,v 1.37 2009-07-21 13:41:16 didg Exp $ * * Copyright (c) 1999 Adrian Sun (asun@zoology.washington.edu) * Copyright (c) 1990,1993 Regents of The University of Michigan. @@ -217,7 +217,7 @@ void afp_over_dsi(AFPObj *obj) u_int32_t err, cmd; u_int8_t function; struct sigaction action; - char *afpcmpstr; + const char *afpcmpstr; obj->exit = afp_dsi_die; obj->reply = (int (*)()) dsi_cmdreply; diff --git a/etc/afpd/afp_options.c b/etc/afpd/afp_options.c index f173d016..2a736785 100644 --- a/etc/afpd/afp_options.c +++ b/etc/afpd/afp_options.c @@ -1,5 +1,5 @@ /* - * $Id: afp_options.c,v 1.43 2009-04-30 10:48:38 franklahm Exp $ + * $Id: afp_options.c,v 1.44 2009-07-21 13:41:16 didg Exp $ * * Copyright (c) 1997 Adrian Sun (asun@zoology.washington.edu) * Copyright (c) 1990,1993 Regents of The University of Michigan. @@ -319,15 +319,16 @@ int afp_options_parseline(char *buf, struct afp_options *options) } /* -[no]setuplog []*/ - char *optstr; c = buf; /* Now THIS is hokey! Multiple occurrences are not supported by our current code, */ /* so I have to loop myself. */ - while (NULL != (c = strstr(c, "-setuplog"))) + while (NULL != (c = strstr(c, "-setuplog"))) { + char *optstr; if ((optstr = getoption(c, "-setuplog"))) { setuplog(optstr); c += sizeof("-setuplog"); } + } if ((c = getoption(buf, "-unsetuplog"))) unsetuplog(c); diff --git a/etc/afpd/fork.c b/etc/afpd/fork.c index 27813b1e..777f9a60 100644 --- a/etc/afpd/fork.c +++ b/etc/afpd/fork.c @@ -1,5 +1,5 @@ /* - * $Id: fork.c,v 1.60 2009-02-25 22:46:11 didg Exp $ + * $Id: fork.c,v 1.61 2009-07-21 13:41:16 didg Exp $ * * Copyright (c) 1990,1993 Regents of The University of Michigan. * All Rights Reserved. See COPYRIGHT. @@ -1105,7 +1105,7 @@ int ibuflen _U_, *rbuflen; see: http://mirror.linux.org.au/pub/linux.conf.au/2007/video/talks/278.pdf. */ int afp_syncfork(obj, ibuf, ibuflen, rbuf, rbuflen ) - AFPObj *obj; + AFPObj *obj _U_; char *ibuf, *rbuf _U_; int ibuflen _U_, *rbuflen; { diff --git a/etc/cnid_dbd/cnid_metad.c b/etc/cnid_dbd/cnid_metad.c index 3aaf4f15..d0207cb8 100644 --- a/etc/cnid_dbd/cnid_metad.c +++ b/etc/cnid_dbd/cnid_metad.c @@ -1,5 +1,5 @@ /* - * $Id: cnid_metad.c,v 1.12 2009-06-09 11:58:49 franklahm Exp $ + * $Id: cnid_metad.c,v 1.13 2009-07-21 13:41:16 didg Exp $ * * Copyright (C) Joerg Lenneis 2003 * All Rights Reserved. See COPYING. @@ -387,7 +387,7 @@ gid_t group_to_gid ( group ) } /* ------------------ */ -void catch_alarm(int sig) { +void catch_alarm(int sig _U_) { alarmed = 1; } diff --git a/include/atalk/adouble.h b/include/atalk/adouble.h index 3f2de200..1e3680a2 100644 --- a/include/atalk/adouble.h +++ b/include/atalk/adouble.h @@ -1,5 +1,5 @@ /* - * $Id: adouble.h,v 1.38 2009-07-20 23:23:02 didg Exp $ + * $Id: adouble.h,v 1.39 2009-07-21 13:41:16 didg Exp $ * Copyright (c) 1990,1991 Regents of The University of Michigan. * All Rights Reserved. * @@ -442,6 +442,7 @@ struct adouble_fops { */ extern int ad_rebuild_adouble_header __P((struct adouble *)); extern int ad_rebuild_sfm_header __P((struct adouble *)); +extern int ad_copy_header __P((struct adouble *, struct adouble *)); extern int ad_flush __P((struct adouble *)); extern int ad_close __P((struct adouble *, int)); diff --git a/libatalk/adouble/ad_attr.c b/libatalk/adouble/ad_attr.c index 3cd55c5d..a5727d52 100644 --- a/libatalk/adouble/ad_attr.c +++ b/libatalk/adouble/ad_attr.c @@ -1,5 +1,5 @@ /* - * $Id: ad_attr.c,v 1.9 2009-06-19 13:38:34 franklahm Exp $ + * $Id: ad_attr.c,v 1.10 2009-07-21 13:41:16 didg Exp $ */ #ifdef HAVE_CONFIG_H @@ -20,8 +20,8 @@ */ int ad_getattr(const struct adouble *ad, u_int16_t *attr) { - *attr = 0; u_int16_t fflags; + *attr = 0; if (ad->ad_version == AD_VERSION1) { if (ad_getentryoff(ad, ADEID_FILEI)) { diff --git a/libatalk/adouble/ad_flush.c b/libatalk/adouble/ad_flush.c index e942607c..341df2e6 100644 --- a/libatalk/adouble/ad_flush.c +++ b/libatalk/adouble/ad_flush.c @@ -1,5 +1,5 @@ /* - * $Id: ad_flush.c,v 1.9 2007-04-11 01:11:10 didg Exp $ + * $Id: ad_flush.c,v 1.10 2009-07-21 13:41:16 didg Exp $ * * Copyright (c) 1990,1991 Regents of The University of Michigan. * All Rights Reserved. @@ -109,7 +109,7 @@ int ad_rebuild_adouble_header(struct adouble *ad) int ad_copy_header(struct adouble *add, struct adouble *ads) { u_int32_t eid; - int len; + u_int32_t len; for ( eid = 0; eid < ADEID_MAX; eid++ ) { if ( ads->ad_eid[ eid ].ade_off == 0 ) { diff --git a/libatalk/adouble/ad_open.c b/libatalk/adouble/ad_open.c index d7251d25..d5d4e274 100644 --- a/libatalk/adouble/ad_open.c +++ b/libatalk/adouble/ad_open.c @@ -1,5 +1,5 @@ /* - * $Id: ad_open.c,v 1.44 2009-07-20 23:23:02 didg Exp $ + * $Id: ad_open.c,v 1.45 2009-07-21 13:41:16 didg Exp $ * * Copyright (c) 1999 Adrian Sun (asun@u.washington.edu) * Copyright (c) 1990,1991 Regents of The University of Michigan. @@ -1136,7 +1136,7 @@ static int new_rfork(const char *path, struct adouble *ad, int adflags); #endif /* --------------------------- */ -static int ad_check_size(struct adouble *ad, struct stat *st) +static int ad_check_size(struct adouble *ad _U_, struct stat *st) { if (st->st_size > 0 && st->st_size < AD_DATASZ1) return 1; @@ -1144,7 +1144,7 @@ static int ad_check_size(struct adouble *ad, struct stat *st) } /* --------------------------- */ -static int ad_check_size_sfm(struct adouble *ad, struct stat *st) +static int ad_check_size_sfm(struct adouble *ad _U_, struct stat *st) { if (st->st_size > 0 && st->st_size < AD_SFM_LEN) return 1; @@ -1164,7 +1164,7 @@ static int ad_header_upgrade(struct adouble *ad, char *name) } /* --------------------------- */ -static int ad_header_upgrade_none(struct adouble *ad, char *name) +static int ad_header_upgrade_none(struct adouble *ad _U_, char *name _U_) { return 0; } diff --git a/libatalk/cnid/dbd/cnid_dbd.c b/libatalk/cnid/dbd/cnid_dbd.c index b7c47e79..ce1c0e24 100644 --- a/libatalk/cnid/dbd/cnid_dbd.c +++ b/libatalk/cnid/dbd/cnid_dbd.c @@ -1,5 +1,5 @@ /* - * $Id: cnid_dbd.c,v 1.8 2009-05-28 10:22:07 franklahm Exp $ + * $Id: cnid_dbd.c,v 1.9 2009-07-21 13:41:16 didg Exp $ * * Copyright (C) Joerg Lenneis 2003 * All Rights Reserved. See COPYING. @@ -328,11 +328,11 @@ static int transmit(CNID_private *db, struct cnid_dbd_rqst *rqst, struct cnid_db time(&orig); while (1) { if (db->fd == -1) { - LOG(log_debug, logtype_cnid, "transmit: connecting to cnid_dbd ..."); struct cnid_dbd_rqst rqst_stamp; struct cnid_dbd_rply rply_stamp; char stamp[ADEDLEN_PRIVSYN]; + LOG(log_debug, logtype_cnid, "transmit: connecting to cnid_dbd ..."); if ((db->fd = init_tsock(db)) < 0) { time(&t); if (t - orig > MAX_DELAY) -- 2.39.2