From: srittau Date: Tue, 31 Jul 2001 19:49:02 +0000 (+0000) Subject: Warning fixes. X-Git-Tag: netatalk-1-5-rc1~311 X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fd371714895adf541884a0f3f83b746a1253fec9;hp=d11dbe849df672f2a193747bf1ba282568d5924a;p=netatalk.git Warning fixes. --- diff --git a/bin/afppasswd/afppasswd.c b/bin/afppasswd/afppasswd.c index 32fc575c..980ca4a2 100644 --- a/bin/afppasswd/afppasswd.c +++ b/bin/afppasswd/afppasswd.c @@ -1,5 +1,5 @@ /* - * $Id: afppasswd.c,v 1.6 2001-06-29 14:14:46 rufustfirefly Exp $ + * $Id: afppasswd.c,v 1.7 2001-07-31 19:49:02 srittau Exp $ * * Copyright 1999 (c) Adrian Sun (asun@u.washington.edu) * All Rights Reserved. See COPYRIGHT. @@ -263,7 +263,7 @@ int main(int argc, char **argv) int i, err = 0; extern char *optarg; - extern int optind, opterr; + extern int optind; flags = ((uid = getuid()) == 0) ? OPT_ISROOT : 0; diff --git a/bin/getzones/getzones.c b/bin/getzones/getzones.c index 7301be97..4e70124d 100644 --- a/bin/getzones/getzones.c +++ b/bin/getzones/getzones.c @@ -1,5 +1,5 @@ /* - * $Id: getzones.c,v 1.4 2001-06-29 14:14:46 rufustfirefly Exp $ + * $Id: getzones.c,v 1.5 2001-07-31 19:49:02 srittau Exp $ */ #ifdef HAVE_CONFIG_H @@ -19,6 +19,7 @@ #endif /* HAVE_NETDB_H */ #include #include +#include #include #include #include diff --git a/bin/nbp/nbpunrgstr.c b/bin/nbp/nbpunrgstr.c index 19966b18..4cd68039 100644 --- a/bin/nbp/nbpunrgstr.c +++ b/bin/nbp/nbpunrgstr.c @@ -1,5 +1,5 @@ /* - * $Id: nbpunrgstr.c,v 1.4 2001-06-29 14:14:46 rufustfirefly Exp $ + * $Id: nbpunrgstr.c,v 1.5 2001-07-31 19:49:02 srittau Exp $ * * Copyright (c) 1990,1991 Regents of The University of Michigan. * All Rights Reserved. @@ -30,6 +30,7 @@ #include #include #include +#include #ifdef HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ diff --git a/bin/pap/pap.c b/bin/pap/pap.c index e65ab39b..a254ab73 100644 --- a/bin/pap/pap.c +++ b/bin/pap/pap.c @@ -1,5 +1,5 @@ /* - * $Id: pap.c,v 1.6 2001-06-29 14:14:46 rufustfirefly Exp $ + * $Id: pap.c,v 1.7 2001-07-31 19:49:02 srittau Exp $ * * Copyright (c) 1990,1994 Regents of The University of Michigan. * All Rights Reserved. See COPYRIGHT. @@ -24,6 +24,7 @@ #include #include #include +#include #include #define FUCKED diff --git a/contrib/printing/timeout.c b/contrib/printing/timeout.c index 539ff7ab..10ff4668 100644 --- a/contrib/printing/timeout.c +++ b/contrib/printing/timeout.c @@ -1,5 +1,5 @@ /* - * $Id: timeout.c,v 1.3 2001-06-29 14:14:46 rufustfirefly Exp $ + * $Id: timeout.c,v 1.4 2001-07-31 19:49:37 srittau Exp $ */ #ifdef HAVE_CONFIG_H @@ -22,108 +22,108 @@ struct slist { int num; } sigs[] = { #ifdef SIGHUP - "HUP", SIGHUP, + { "HUP", SIGHUP }, #endif #ifdef SIGINT - "INT", SIGINT, + { "INT", SIGINT }, #endif #ifdef SIGQUIT - "QUIT", SIGQUIT, + { "QUIT", SIGQUIT }, #endif #ifdef SIGILL - "ILL", SIGILL, + { "ILL", SIGILL }, #endif #ifdef SIGTRAP - "TRAP", SIGTRAP, + { "TRAP", SIGTRAP }, #endif #ifdef SIGABRT - "ABRT", SIGABRT, + { "ABRT", SIGABRT }, #endif #ifdef SIGIOT - "IOT", SIGIOT, + { "IOT", SIGIOT }, #endif #ifdef SIGEMT - "EMT", SIGEMT, + { "EMT", SIGEMT }, #endif #ifdef SIGFPE - "FPE", SIGFPE, + { "FPE", SIGFPE }, #endif #ifdef SIGKILL - "KILL", SIGKILL, + { "KILL", SIGKILL }, #endif #ifdef SIGBUS - "BUS", SIGBUS, + { "BUS", SIGBUS }, #endif #ifdef SIGSEGV - "SEGV", SIGSEGV, + { "SEGV", SIGSEGV }, #endif #ifdef SIGSYS - "SYS", SIGSYS, + { "SYS", SIGSYS }, #endif #ifdef SIGPIPE - "PIPE", SIGPIPE, + { "PIPE", SIGPIPE }, #endif #ifdef SIGALRM - "ALRM", SIGALRM, + { "ALRM", SIGALRM }, #endif #ifdef SIGTERM - "TERM", SIGTERM, + { "TERM", SIGTERM }, #endif #ifdef SIGURG - "URG", SIGURG, + { "URG", SIGURG }, #endif #ifdef SIGSTOP - "STOP", SIGSTOP, + { "STOP", SIGSTOP }, #endif #ifdef SIGTSTP - "TSTP", SIGTSTP, + { "TSTP", SIGTSTP }, #endif #ifdef SIGCONT - "CONT", SIGCONT, + { "CONT", SIGCONT }, #endif #ifdef SIGCHLD - "CHLD", SIGCHLD, + { "CHLD", SIGCHLD }, #endif #ifdef SIGCLD - "CLD", SIGCLD, + { "CLD", SIGCLD }, #endif #ifdef SIGTTIN - "TTIN", SIGTTIN, + { "TTIN", SIGTTIN }, #endif #ifdef SIGTTOU - "TTOU", SIGTTOU, + { "TTOU", SIGTTOU }, #endif #ifdef SIGIO - "IO", SIGIO, + { "IO", SIGIO }, #endif #ifdef SIGXCPU - "XCPU", SIGXCPU, + { "XCPU", SIGXCPU }, #endif #ifdef SIGXFSZ - "XFSZ", SIGXFSZ, + { "XFSZ", SIGXFSZ }, #endif #ifdef SIGVTALRM - "VTALRM", SIGVTALRM, + { "VTALRM", SIGVTALRM }, #endif #ifdef SIGPROF - "PROF", SIGPROF, + { "PROF", SIGPROF }, #endif #ifdef SIGWINCH - "WINCH", SIGWINCH, + { "WINCH", SIGWINCH }, #endif #ifdef SIGINFO - "INFO", SIGINFO, + { "INFO", SIGINFO }, #endif #ifdef SIGUSR1 - "USR1", SIGUSR1, + { "USR1", SIGUSR1 }, #endif #ifdef SIGUSR2 - "USR2", SIGUSR2, + { "USR2", SIGUSR2 }, #endif #ifdef SIGPWR - "PWR", SIGPWR, + { "PWR", SIGPWR }, #endif - 0, 0 + { 0, 0 } }; void diff --git a/etc/afpd/afp_asp.c b/etc/afpd/afp_asp.c index 316ec0bf..89641691 100644 --- a/etc/afpd/afp_asp.c +++ b/etc/afpd/afp_asp.c @@ -1,5 +1,5 @@ /* - * $Id: afp_asp.c,v 1.5 2001-06-20 18:33:04 rufustfirefly Exp $ + * $Id: afp_asp.c,v 1.6 2001-07-31 19:50:14 srittau Exp $ * * Copyright (c) 1997 Adrian Sun (asun@zoology.washington.edu) * Copyright (c) 1990,1993 Regents of The University of Michigan. @@ -174,7 +174,7 @@ void afp_over_asp(AFPObj *obj) } writtenfork = NULL; } -#endif AFS +#endif /* AFS */ func = (u_char) asp->commands[0]; if ( obj->options.flags & OPTION_DEBUG ) { printf( "command: %d\n", func ); diff --git a/etc/afpd/afp_options.c b/etc/afpd/afp_options.c index 199d09f6..e7a8f188 100644 --- a/etc/afpd/afp_options.c +++ b/etc/afpd/afp_options.c @@ -1,5 +1,5 @@ /* - * $Id: afp_options.c,v 1.7 2001-06-20 18:33:04 rufustfirefly Exp $ + * $Id: afp_options.c,v 1.8 2001-07-31 19:50:14 srittau Exp $ * * Copyright (c) 1997 Adrian Sun (asun@zoology.washington.edu) * Copyright (c) 1990,1993 Regents of The University of Michigan. @@ -120,7 +120,7 @@ void afp_options_init(struct afp_options *options) options->configfile = _PATH_AFPDCONF; options->nlspath = _PATH_AFPDNLSPATH; options->uampath = _PATH_AFPDUAMPATH; - options->uamlist = "uams_guest.so,uams_clrtxt.so,uams_dhx.so"; + options->uamlist = "uams_clrtxt.so,uams_dhx.so"; options->guest = "nobody"; options->loginmesg = ""; options->transports = AFPTRANS_ALL; diff --git a/etc/afpd/auth.c b/etc/afpd/auth.c index e3d76d18..195ba5eb 100644 --- a/etc/afpd/auth.c +++ b/etc/afpd/auth.c @@ -1,5 +1,5 @@ /* - * $Id: auth.c,v 1.16 2001-06-25 15:18:01 rufustfirefly Exp $ + * $Id: auth.c,v 1.17 2001-07-31 19:50:14 srittau Exp $ * * Copyright (c) 1990,1993 Regents of The University of Michigan. * All Rights Reserved. See COPYRIGHT. @@ -52,15 +52,15 @@ int afp_version = 11; uid_t uuid; #if defined( __svr4__ ) && !defined( NGROUPS ) #define NGROUPS NGROUPS_MAX -#endif __svr4__ NGROUPS +#endif /* __svr4__ NGROUPS */ #if defined( sun ) && !defined( __svr4__ ) || defined( ultrix ) int groups[ NGROUPS ]; -#else sun __svr4__ ultrix +#else /* sun __svr4__ ultrix */ #if defined( __svr4__ ) && !defined( NGROUPS ) #define NGROUPS NGROUPS_MAX -#endif __svr4__ NGROUPS +#endif /* __svr4__ NGROUPS */ gid_t groups[ NGROUPS ]; -#endif sun ultrix +#endif /* sun ultrix */ int ngroups; /* @@ -151,7 +151,7 @@ static int login(AFPObj *obj, struct passwd *pwd, void (*logout)(void)) { #ifdef ADMIN_GRP int admin = 0; -#endif ADMIN_GRP +#endif /* ADMIN_GRP */ /* UAM had syslog control; afpd needs to reassert itself */ openlog( "afpd", LOG_NDELAY|LOG_PID, LOG_DAEMON); diff --git a/etc/afpd/quota.c b/etc/afpd/quota.c index 8f92111f..2398c6c6 100644 --- a/etc/afpd/quota.c +++ b/etc/afpd/quota.c @@ -1,5 +1,5 @@ /* - * $Id: quota.c,v 1.9 2001-06-20 18:33:04 rufustfirefly Exp $ + * $Id: quota.c,v 1.10 2001-07-31 19:50:14 srittau Exp $ * * Copyright (c) 1990,1993 Regents of The University of Michigan. * All Rights Reserved. See COPYRIGHT. @@ -195,7 +195,7 @@ static int getfsquota(vol, uid, dq) if ( quota( Q_GETDLIM, uid, vol->v_gvs, dq ) != 0 ) { return( AFPERR_PARAM ); } -#else ultrix +#else /* ultrix */ #ifndef USRQUOTA #define USRQUOTA 0 diff --git a/etc/afpd/test_parse_mtab.c b/etc/afpd/test_parse_mtab.c index 03ebd37b..ffa95138 100644 --- a/etc/afpd/test_parse_mtab.c +++ b/etc/afpd/test_parse_mtab.c @@ -1,5 +1,5 @@ /* - * $Id: test_parse_mtab.c,v 1.2 2001-06-10 20:15:00 srittau Exp $ + * $Id: test_parse_mtab.c,v 1.3 2001-07-31 19:50:14 srittau Exp $ * test driver for the afpd_mtab_parse fn. -- rgr, 9-Apr-01. */ @@ -10,6 +10,7 @@ #include #include #include +#include #ifdef HAVE_SYS_STAT_H #include diff --git a/etc/afpd/unix.c b/etc/afpd/unix.c index acb6e23b..8c1029b7 100644 --- a/etc/afpd/unix.c +++ b/etc/afpd/unix.c @@ -1,5 +1,5 @@ /* - * $Id: unix.c,v 1.18 2001-06-06 19:04:25 rufustfirefly Exp $ + * $Id: unix.c,v 1.19 2001-07-31 19:50:14 srittau Exp $ * * Copyright (c) 1990,1993 Regents of The University of Michigan. * All Rights Reserved. See COPYRIGHT. @@ -52,10 +52,10 @@ int ustatfs_getvolspace( vol, bfree, btotal, bsize ) #ifdef ultrix *bfree = (VolSpace) sfs.fd_req.bfreen; *bsize = 1024; -#else +#else /* !ultrix */ *bfree = (VolSpace) sfs.f_bavail; *bsize = sfs.f_frsize; -#endif ultrix +#endif /* ultrix */ if ( *bfree > maxVolSpace / *bsize ) { *bfree = maxVolSpace; @@ -66,10 +66,10 @@ int ustatfs_getvolspace( vol, bfree, btotal, bsize ) #ifdef ultrix *btotal = (VolSpace) ( sfs.fd_req.btot - ( sfs.fd_req.bfree - sfs.fd_req.bfreen )); -#else ultrix +#else /* !ultrix */ *btotal = (VolSpace) ( sfs.f_blocks - ( sfs.f_bfree - sfs.f_bavail )); -#endif ultrix +#endif /* ultrix */ // see similar block above comments if ( *btotal > maxVolSpace / *bsize ) { diff --git a/etc/atalkd/interface.h b/etc/atalkd/interface.h index 735b1f7e..f1e4dd3f 100644 --- a/etc/atalkd/interface.h +++ b/etc/atalkd/interface.h @@ -1,5 +1,5 @@ /* - * $Id: interface.h,v 1.2 2001-06-25 20:13:45 rufustfirefly Exp $ + * $Id: interface.h,v 1.3 2001-07-31 19:50:14 srittau Exp $ * Copyright (c) 1990,1992 Regents of The University of Michigan. * All Rights Reserved. See COPYRIGHT. */ @@ -45,9 +45,9 @@ struct interface { #ifdef linux #define LOOPIFACE "lo" -#else linux +#else /* !linux */ #define LOOPIFACE "lo0" -#endif linux +#endif /* linux */ extern struct interface *interfaces; extern struct interface *ciface; diff --git a/etc/atalkd/multicast.c b/etc/atalkd/multicast.c index 72dba048..af0b7115 100644 --- a/etc/atalkd/multicast.c +++ b/etc/atalkd/multicast.c @@ -1,5 +1,5 @@ /* - * $Id: multicast.c,v 1.5 2001-06-25 20:13:45 rufustfirefly Exp $ + * $Id: multicast.c,v 1.6 2001-07-31 19:50:14 srittau Exp $ * * Copyright (c) 1990,1993 Regents of The University of Michigan. * All Rights Reserved. See COPYRIGHT. @@ -394,7 +394,7 @@ zone_bcast( zt ) } for ( i = 0; i < zt->zt_len; i++ ) { - uname[ i ] = diatoupper(zt->zt_name[ i ]); + uname[ i ] = diatoupper((int) zt->zt_name[ i ]); } cksum = atalk_cksum( uname, zt->zt_len ); #define elements(a) (sizeof(a)/sizeof((a)[0])) diff --git a/etc/papd/main.c b/etc/papd/main.c index be4d84f6..03b088c2 100644 --- a/etc/papd/main.c +++ b/etc/papd/main.c @@ -1,5 +1,5 @@ /* - * $Id: main.c,v 1.7 2001-06-25 20:13:45 rufustfirefly Exp $ + * $Id: main.c,v 1.8 2001-07-31 19:50:14 srittau Exp $ * * Copyright (c) 1990,1995 Regents of The University of Michigan. * All Rights Reserved. See COPYRIGHT. @@ -140,7 +140,6 @@ int main( ac, av ) char **av; { extern char *optarg; - extern int optind; ATP atp; struct atp_block atpb; diff --git a/etc/papd/printcap.c b/etc/papd/printcap.c index 203269f2..633ff4eb 100644 --- a/etc/papd/printcap.c +++ b/etc/papd/printcap.c @@ -1,5 +1,5 @@ /* - * $Id: printcap.c,v 1.4 2001-06-25 20:13:45 rufustfirefly Exp $ + * $Id: printcap.c,v 1.5 2001-07-31 19:50:14 srittau Exp $ * * Copyright (c) 1990,1994 Regents of The University of Michigan. * All Rights Reserved. See COPYRIGHT. @@ -47,7 +47,7 @@ static char sccsid[] = "@(#)printcap.c 5.7 (Berkeley) 3/4/91"; #include #include #include -#ifndef HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ #include diff --git a/etc/papd/queries.c b/etc/papd/queries.c index 01a7d3ba..ba0e8ca1 100644 --- a/etc/papd/queries.c +++ b/etc/papd/queries.c @@ -1,5 +1,5 @@ /* - * $Id: queries.c,v 1.7 2001-06-25 20:13:45 rufustfirefly Exp $ + * $Id: queries.c,v 1.8 2001-07-31 19:50:14 srittau Exp $ * * Copyright (c) 1990,1994 Regents of The University of Michigan. * All Rights Reserved. See COPYRIGHT. @@ -743,7 +743,7 @@ struct papd_comment queries[] = { #ifdef KRB { "%%Login: UMICHKerberosIV", 0, cq_k4login, 0 }, { "%%?BeginUAMethodsQuery", "%%?EndUAMethodsQuery:", cq_uameth, C_FULL }, -#endif KRB +#endif /* KRB */ { "%UMICHListQueue", 0, cq_listq, C_FULL }, { "%UMICHDeleteJob", 0, cq_rmjob, 0 }, { "%%?BeginQuery: RBILogin ", "%%?EndQuery", cq_rbilogin, 0 }, diff --git a/include/atalk/adouble.h b/include/atalk/adouble.h index 79a2fa87..0969bd2b 100644 --- a/include/atalk/adouble.h +++ b/include/atalk/adouble.h @@ -1,5 +1,5 @@ /* - * $Id: adouble.h,v 1.6 2001-06-11 17:27:28 rufustfirefly Exp $ + * $Id: adouble.h,v 1.7 2001-07-31 19:51:12 srittau Exp $ * Copyright (c) 1990,1991 Regents of The University of Michigan. * All Rights Reserved. * @@ -125,7 +125,7 @@ static inline int sendfile(int fdout, int fdin, off_t *off, size_t count) #define AD_DATASZ_MAX 1024 #if AD_VERSION == AD_VERSION1 #define AD_DATASZ AD_DATASZ1 /* hold enough for the entries */ -#else if AD_VERSION == AD_VERSION2 +#elif AD_VERSION == AD_VERSION2 #define AD_DATASZ AD_DATASZ2 #endif diff --git a/include/atalk/nbp.h b/include/atalk/nbp.h index 6ae31aa1..e917adfa 100644 --- a/include/atalk/nbp.h +++ b/include/atalk/nbp.h @@ -35,10 +35,10 @@ struct nbphdr { #if BYTE_ORDER == BIG_ENDIAN unsigned nh_op : 4, nh_cnt : 4, -#else BYTE_ORDER +#else /* BYTE_ORDER != BIG_ENDIAN */ unsigned nh_cnt : 4, nh_op : 4, -#endif BYTE_ORDER +#endif /* BYTE_ORDER */ nh_id : 8; }; diff --git a/include/atalk/paths.h b/include/atalk/paths.h index ae076a7a..0029cbff 100644 --- a/include/atalk/paths.h +++ b/include/atalk/paths.h @@ -37,14 +37,14 @@ #define _PATH_PAPDPRINTCAP "/etc/printcap" #ifdef ultrix #define _PATH_PAPDSPOOLDIR "/usr/spool/lpd" -#else ultrix +#else /* !ultrix */ #define _PATH_PAPDSPOOLDIR "/var/spool/lpd" -#endif ultrix +#endif /* ultrix */ #ifdef BSD4_4 #define _PATH_DEVPRINTER "/var/run/printer" -#else BSD4_4 +#else /* !BSD4_4 */ #define _PATH_DEVPRINTER "/dev/printer" -#endif BSD4_4 +#endif /* BSD4_4 */ /* * atalkd paths diff --git a/libatalk/adouble/ad_open.c b/libatalk/adouble/ad_open.c index 22fc4415..6bd0205d 100644 --- a/libatalk/adouble/ad_open.c +++ b/libatalk/adouble/ad_open.c @@ -1,5 +1,5 @@ /* - * $Id: ad_open.c,v 1.8 2001-06-29 14:14:46 rufustfirefly Exp $ + * $Id: ad_open.c,v 1.9 2001-07-31 19:52:25 srittau Exp $ * * Copyright (c) 1999 Adrian Sun (asun@u.washington.edu) * Copyright (c) 1990,1991 Regents of The University of Michigan. @@ -155,7 +155,7 @@ static const struct entry entry_order[] = { {ADEID_RFORK, ADEDOFF_RFORK_V1, ADEDLEN_INIT}, {0, 0, 0} }; -#else if AD_VERSION == AD_VERSION2 +#else /* AD_VERSION == AD_VERSION2 */ static const struct entry entry_order[] = { {ADEID_NAME, ADEDOFF_NAME_V2, ADEDLEN_INIT}, {ADEID_COMMENT, ADEDOFF_COMMENT_V2, ADEDLEN_INIT}, diff --git a/libatalk/util/getiface.c b/libatalk/util/getiface.c index af175d99..2088dc21 100644 --- a/libatalk/util/getiface.c +++ b/libatalk/util/getiface.c @@ -98,9 +98,9 @@ static int getifaces(const int sockfd, char **list, int *length) ifrsize = sizeof(ifr->ifr_name) + (ifr->ifr_addr.sa_len > sizeof(struct sockaddr) ? ifr->ifr_addr.sa_len : sizeof(struct sockaddr)); -#else BSD4_4 +#else /* !BSD4_4 */ ifrsize = sizeof( struct ifreq ); -#endif BSD4_4 +#endif /* BSD4_4 */ nextifr = (struct ifreq *)((caddr_t)ifr + ifrsize ); /* just bail if there's a problem */