Fix additional warnings. Remove -Werror, since some people have complained
about it. PR: 7886 Submitted by: Stefan Eggers <seggers@semyam.dinoco.de> (partially)
This commit is contained in:
parent
37d2c8c237
commit
aac5469d30
@ -1,6 +1,6 @@
|
||||
# $Id: Makefile.inc,v 1.2 1997/12/17 19:38:30 wollman Exp $
|
||||
# $Id: Makefile.inc,v 1.3 1998/03/07 09:47:52 bde Exp $
|
||||
|
||||
CWARNFLAGS= -Werror -Wall -Wnested-externs -Wmissing-prototypes -Wno-unused
|
||||
CWARNFLAGS= -Wall -Wnested-externs -Wmissing-prototypes -Wno-unused -Wredundant-decls -Wstrict-prototypes
|
||||
|
||||
.if exists(${.OBJDIR}/../common_source)
|
||||
LIBLPR= ${.OBJDIR}/../common_source/liblpr.a
|
||||
|
@ -1,8 +1,8 @@
|
||||
# $Id: Makefile,v 1.4 1998/05/13 06:50:09 jb Exp $
|
||||
# $Id: Makefile,v 1.5 1998/06/11 03:51:34 jb Exp $
|
||||
|
||||
PROG= chkprintcap
|
||||
MAN8= chkprintcap.8
|
||||
CFLAGS+=-I${.CURDIR}/../common_source -Wall
|
||||
CFLAGS+=-I${.CURDIR}/../common_source ${CWARNFLAGS}
|
||||
.PATH: ${.CURDIR}/../common_source
|
||||
DPADD= ${LIBLPR}
|
||||
LDADD= ${LIBLPR}
|
||||
|
@ -1,4 +1,4 @@
|
||||
# $Id: Makefile,v 1.2 1998/05/13 06:49:19 jb Exp $
|
||||
# $Id: Makefile,v 1.3 1998/06/11 03:53:23 jb Exp $
|
||||
|
||||
#
|
||||
# Library of internal routines for the print spooler suite.
|
||||
@ -11,8 +11,7 @@ SRCS= common.c displayq.c net.c printcap.c request.c rmjob.c \
|
||||
NOMAN= noman
|
||||
NOPROFILE= noprofile
|
||||
NOPIC= nopic
|
||||
CFLAGS+= -Wall -Wnested-externs -Wmissing-prototypes \
|
||||
-Wstrict-prototypes -Wredundant-decls
|
||||
CFLAGS+= ${CWARNFLAGS}
|
||||
|
||||
install:
|
||||
|
||||
|
@ -41,7 +41,7 @@
|
||||
static char sccsid[] = "@(#)common.c 8.5 (Berkeley) 4/28/95";
|
||||
*/
|
||||
static const char rcsid[] =
|
||||
"$Id$";
|
||||
"$Id: common.c,v 1.10 1997/12/02 20:45:18 wollman Exp $";
|
||||
#endif /* not lint */
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -79,7 +79,7 @@ getline(cfp)
|
||||
{
|
||||
register int linel = 0;
|
||||
register char *lp = line;
|
||||
register c;
|
||||
register int c;
|
||||
|
||||
while ((c = getc(cfp)) != '\n' && linel+1 < sizeof(line)) {
|
||||
if (c == EOF)
|
||||
|
@ -43,7 +43,7 @@ static const char copyright[] =
|
||||
static char sccsid[] = "@(#)cmds.c 8.2 (Berkeley) 4/28/95";
|
||||
*/
|
||||
static const char rcsid[] =
|
||||
"$Id$";
|
||||
"$Id: cmds.c,v 1.11 1997/12/02 20:45:37 wollman Exp $";
|
||||
#endif /* not lint */
|
||||
|
||||
/*
|
||||
@ -70,8 +70,6 @@ static const char rcsid[] =
|
||||
#include "extern.h"
|
||||
#include "pathnames.h"
|
||||
|
||||
extern uid_t uid, euid;
|
||||
|
||||
static void abortpr __P((struct printer *, int));
|
||||
static int doarg __P((char *));
|
||||
static int doselect __P((struct dirent *));
|
||||
|
@ -35,6 +35,7 @@
|
||||
*/
|
||||
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/cdefs.h>
|
||||
|
||||
|
||||
@ -57,3 +58,4 @@ __END_DECLS
|
||||
|
||||
extern int NCMDS;
|
||||
extern struct cmd cmdtab[];
|
||||
extern uid_t uid, euid;
|
||||
|
@ -43,7 +43,7 @@ static const char copyright[] =
|
||||
static char sccsid[] = "@(#)lpc.c 8.3 (Berkeley) 4/28/95";
|
||||
#endif
|
||||
static const char rcsid[] =
|
||||
"$Id: lpc.c,v 1.6 1997/12/02 20:45:43 wollman Exp $";
|
||||
"$Id: lpc.c,v 1.7 1998/03/22 20:19:27 jb Exp $";
|
||||
#endif /* not lint */
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -74,16 +74,17 @@ static const char rcsid[] =
|
||||
|
||||
#define MAX_CMDLINE 200
|
||||
#define MAX_MARGV 20
|
||||
int fromatty;
|
||||
static int fromatty;
|
||||
|
||||
char cmdline[MAX_CMDLINE];
|
||||
int margc;
|
||||
char *margv[MAX_MARGV];
|
||||
int top;
|
||||
uid_t uid, euid;
|
||||
static char cmdline[MAX_CMDLINE];
|
||||
static int margc;
|
||||
static char *margv[MAX_MARGV];
|
||||
static int top;
|
||||
uid_t uid, euid;
|
||||
|
||||
jmp_buf toplevel;
|
||||
static jmp_buf toplevel;
|
||||
|
||||
int main __P((int, char *[]));
|
||||
static void cmdscanner __P((int));
|
||||
static struct cmd *getcmd __P((char *));
|
||||
static void intr __P((int));
|
||||
|
@ -1,8 +1,8 @@
|
||||
# From: @(#)Makefile 8.1 (Berkeley) 6/6/93
|
||||
# $Id: Makefile,v 1.7 1998/05/13 06:48:18 jb Exp $
|
||||
# $Id: Makefile,v 1.8 1998/06/11 03:52:41 jb Exp $
|
||||
|
||||
PROG= lpd
|
||||
CFLAGS+=-I${.CURDIR}/../common_source -Wall
|
||||
CFLAGS+=-I${.CURDIR}/../common_source ${CWARNFLAGS}
|
||||
MAN8= lpd.8
|
||||
SRCS= lpd.c printjob.c recvjob.c lpdchar.c modes.c
|
||||
DPADD= ${LIBLPR}
|
||||
|
@ -31,7 +31,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* From: @(#)extern.h 8.1 (Berkeley) 6/6/93
|
||||
* $Id$
|
||||
* $Id: extern.h,v 1.3 1997/12/02 20:45:53 wollman Exp $
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
@ -40,9 +40,11 @@ extern char scnkey[][HEIGHT]; /* in lpdchar.c */
|
||||
extern char fromb[];
|
||||
|
||||
struct printer;
|
||||
struct termios;
|
||||
|
||||
__BEGIN_DECLS
|
||||
void printjob __P((struct printer *pp));
|
||||
void startprinting __P((const char *printer));
|
||||
void recvjob __P((const char *printer));
|
||||
int msearch __P((char *str, struct termios *ip));
|
||||
__END_DECLS
|
||||
|
@ -43,7 +43,7 @@ static const char copyright[] =
|
||||
static char sccsid[] = "@(#)lpd.c 8.7 (Berkeley) 5/10/95";
|
||||
#endif
|
||||
static const char rcsid[] =
|
||||
"$Id: lpd.c,v 1.8 1997/09/24 06:47:54 charnier Exp $";
|
||||
"$Id: lpd.c,v 1.9 1997/12/02 20:45:54 wollman Exp $";
|
||||
#endif /* not lint */
|
||||
|
||||
/*
|
||||
@ -106,6 +106,7 @@ static const char rcsid[] =
|
||||
int lflag; /* log requests flag */
|
||||
int from_remote; /* from remote socket */
|
||||
|
||||
int main __P((int, char **));
|
||||
static void reapchild __P((int));
|
||||
static void mcleanup __P((int));
|
||||
static void doit __P((void));
|
||||
|
@ -36,12 +36,14 @@
|
||||
static char sccsid[] = "@(#)modes.c 8.3 (Berkeley) 4/2/94";
|
||||
*/
|
||||
static const char rcsid[] =
|
||||
"$Id$";
|
||||
"$Id: modes.c,v 1.4 1997/12/02 20:45:56 wollman Exp $";
|
||||
#endif /* not lint */
|
||||
|
||||
#include <stddef.h>
|
||||
#include <string.h>
|
||||
#include <termios.h>
|
||||
#include "lp.local.h"
|
||||
#include "extern.h"
|
||||
|
||||
struct modes {
|
||||
char *name;
|
||||
|
@ -43,7 +43,7 @@ static const char copyright[] =
|
||||
static char sccsid[] = "@(#)printjob.c 8.7 (Berkeley) 5/10/95";
|
||||
*/
|
||||
static const char rcsid[] =
|
||||
"$Id: printjob.c,v 1.18 1997/12/02 20:45:58 wollman Exp $";
|
||||
"$Id: printjob.c,v 1.19 1998/08/21 18:08:46 brian Exp $";
|
||||
#endif /* not lint */
|
||||
|
||||
|
||||
@ -141,8 +141,6 @@ static int sendit __P((struct printer *pp, char *file));
|
||||
static void sendmail __P((struct printer *pp, char *user, int bombed));
|
||||
static void setty __P((const struct printer *pp));
|
||||
|
||||
void msearch __P((char *, struct termios *));
|
||||
|
||||
void
|
||||
printjob(pp)
|
||||
struct printer *pp;
|
||||
@ -1150,7 +1148,7 @@ scnline(key, p, c)
|
||||
register char *p;
|
||||
int c;
|
||||
{
|
||||
register scnwidth;
|
||||
register int scnwidth;
|
||||
|
||||
for (scnwidth = WIDTH; --scnwidth;) {
|
||||
key <<= 1;
|
||||
@ -1168,7 +1166,7 @@ scan_out(pp, scfd, scsp, dlm)
|
||||
char *scsp;
|
||||
{
|
||||
register char *strp;
|
||||
register nchrs, j;
|
||||
register int nchrs, j;
|
||||
char outbuf[LINELEN+1], *sp, c, cc;
|
||||
int d, scnhgt;
|
||||
|
||||
@ -1596,7 +1594,7 @@ setty(pp)
|
||||
char *s = strdup(pp->mode_set), *tmp;
|
||||
|
||||
while ((tmp = strsep(&s, ",")) != NULL) {
|
||||
msearch(tmp, &ttybuf);
|
||||
(void) msearch(tmp, &ttybuf);
|
||||
}
|
||||
}
|
||||
if (pp->mode_set != 0 || pp->baud_rate > 0) {
|
||||
|
@ -43,7 +43,7 @@ static const char copyright[] =
|
||||
static char sccsid[] = "@(#)lpq.c 8.3 (Berkeley) 5/10/95";
|
||||
*/
|
||||
static const char rcsid[] =
|
||||
"$Id$";
|
||||
"$Id: lpq.c,v 1.5 1997/12/02 20:46:04 wollman Exp $";
|
||||
#endif /* not lint */
|
||||
|
||||
/*
|
||||
@ -79,6 +79,7 @@ uid_t uid, euid;
|
||||
|
||||
static int ckqueue __P((const struct printer *));
|
||||
static void usage __P((void));
|
||||
int main __P((int, char **));
|
||||
|
||||
int
|
||||
main(argc, argv)
|
||||
|
@ -48,7 +48,7 @@ static const char copyright[] =
|
||||
static char sccsid[] = "@(#)from: lpr.c 8.4 (Berkeley) 4/28/95";
|
||||
#endif
|
||||
static const char rcsid[] =
|
||||
"$Id: lpr.c,v 1.23 1997/12/06 17:55:07 jdp Exp $";
|
||||
"$Id: lpr.c,v 1.24 1998/04/17 17:25:49 obrien Exp $";
|
||||
#endif /* not lint */
|
||||
|
||||
/*
|
||||
@ -550,7 +550,7 @@ static void
|
||||
cleanup(signo)
|
||||
int signo;
|
||||
{
|
||||
register i;
|
||||
register int i;
|
||||
|
||||
signal(SIGHUP, SIG_IGN);
|
||||
signal(SIGINT, SIG_IGN);
|
||||
@ -610,6 +610,9 @@ test(file)
|
||||
printf("%s: cannot open %s\n", name, file);
|
||||
return(-1);
|
||||
}
|
||||
/*
|
||||
* XXX Shall we add a similar test for ELF?
|
||||
*/
|
||||
if (read(fd, &execb, sizeof(execb)) == sizeof(execb) &&
|
||||
!N_BADMAG(execb)) {
|
||||
printf("%s: %s is an executable program", name, file);
|
||||
|
@ -43,7 +43,7 @@ static const char copyright[] =
|
||||
static char sccsid[] = "@(#)lprm.c 8.1 (Berkeley) 6/6/93";
|
||||
#endif
|
||||
static const char rcsid[] =
|
||||
"$Id: lprm.c,v 1.3 1997/09/24 06:48:17 charnier Exp $";
|
||||
"$Id: lprm.c,v 1.4 1997/12/02 20:46:15 wollman Exp $";
|
||||
#endif /* not lint */
|
||||
|
||||
/*
|
||||
@ -82,6 +82,7 @@ uid_t uid, euid; /* real and effective user id's */
|
||||
|
||||
static char luser[16]; /* buffer for person */
|
||||
|
||||
int main __P((int, char *[]));
|
||||
static void usage __P((void));
|
||||
|
||||
int
|
||||
|
@ -1,8 +1,8 @@
|
||||
# From: @(#)Makefile 8.1 (Berkeley) 6/6/93
|
||||
# $Id: Makefile,v 1.4 1997/12/16 17:53:39 bde Exp $
|
||||
# $Id: Makefile,v 1.5 1998/03/07 09:48:14 bde Exp $
|
||||
|
||||
PROG= pac
|
||||
CFLAGS+=-I${.CURDIR}/../common_source
|
||||
CFLAGS+=-I${.CURDIR}/../common_source ${CWARNFLAGS}
|
||||
MAN8= pac.8
|
||||
.PATH: ${.CURDIR}/../common_source
|
||||
DPADD= ${LIBLPR}
|
||||
|
@ -43,7 +43,7 @@ static const char copyright[] =
|
||||
static char sccsid[] = "@(#)pac.c 8.1 (Berkeley) 6/6/93";
|
||||
#endif
|
||||
static const char rcsid[] =
|
||||
"$Id: pac.c,v 1.7 1997/09/24 06:48:24 charnier Exp $";
|
||||
"$Id: pac.c,v 1.8 1997/12/02 20:46:22 wollman Exp $";
|
||||
#endif /* not lint */
|
||||
|
||||
/*
|
||||
@ -56,9 +56,11 @@ static const char rcsid[] =
|
||||
#include <sys/param.h>
|
||||
|
||||
#include <dirent.h>
|
||||
#include <err.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include "lp.h"
|
||||
#include "lp.local.h"
|
||||
|
||||
@ -94,6 +96,7 @@ struct hent {
|
||||
|
||||
static struct hent *hashtab[HSHSIZE]; /* Hash table proper */
|
||||
|
||||
int main __P((int, char **));
|
||||
static void account __P((FILE *));
|
||||
static int any __P((int, char []));
|
||||
static int chkprinter __P((char *));
|
||||
|
Loading…
Reference in New Issue
Block a user