forked from mirrors/tftp-hpa-google
Quiet final set of warnings.
This commit is contained in:
parent
0034637792
commit
304cb0877c
5 changed files with 36 additions and 19 deletions
|
@ -38,5 +38,10 @@
|
||||||
* @(#)extern.h 8.1 (Berkeley) 6/6/93
|
* @(#)extern.h 8.1 (Berkeley) 6/6/93
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifndef RECVFILE_H
|
||||||
|
#define RECVFILE_H
|
||||||
|
|
||||||
void recvfile (int, char *, char *);
|
void recvfile (int, char *, char *);
|
||||||
void sendfile (int, char *, char *);
|
void sendfile (int, char *, char *);
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
16
tftp/main.c
16
tftp/main.c
|
@ -34,13 +34,16 @@
|
||||||
* SUCH DAMAGE.
|
* SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "tftpsubs.h"
|
||||||
|
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
static const char *copyright =
|
static const char *copyright UNUSED =
|
||||||
"@(#) Copyright (c) 1983, 1993\n\
|
"@(#) Copyright (c) 1983, 1993\n\
|
||||||
The Regents of the University of California. All rights reserved.\n";
|
The Regents of the University of California. All rights reserved.\n";
|
||||||
/* static char sccsid[] = "@(#)main.c 8.1 (Berkeley) 6/6/93"; */
|
/* static char sccsid[] = "@(#)main.c 8.1 (Berkeley) 6/6/93"; */
|
||||||
/* static char rcsid[] = "$OpenBSD: main.c,v 1.4 1997/01/17 07:13:30 millert Exp $"; */
|
/* static char rcsid[] = "$OpenBSD: main.c,v 1.4 1997/01/17 07:13:30 millert Exp $"; */
|
||||||
static const char *rcsid = "tftp-hpa $Id$";
|
static const char *rcsid UNUSED =
|
||||||
|
"tftp-hpa $Id$";
|
||||||
#endif /* not lint */
|
#endif /* not lint */
|
||||||
|
|
||||||
/* Many bug fixes are from Jim Guyton <guyton@rand-unix> */
|
/* Many bug fixes are from Jim Guyton <guyton@rand-unix> */
|
||||||
|
@ -66,17 +69,8 @@ static const char *rcsid = "tftp-hpa $Id$";
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
#include "../config.h"
|
|
||||||
#include "extern.h"
|
#include "extern.h"
|
||||||
|
|
||||||
void bsd_signal(int, void (*)(int));
|
|
||||||
|
|
||||||
#ifndef HAVE_SIGSETJMP
|
|
||||||
#define sigsetjmp(x,y) setjmp(x)
|
|
||||||
#define siglongjmp(x,y) longjmp(x,y)
|
|
||||||
#define sigjmp_buf jmp_buf
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define TIMEOUT 5 /* secs between rexmt's */
|
#define TIMEOUT 5 /* secs between rexmt's */
|
||||||
#define LBUFLEN 200 /* size of input buffer */
|
#define LBUFLEN 200 /* size of input buffer */
|
||||||
|
|
||||||
|
|
|
@ -36,10 +36,13 @@
|
||||||
* SUCH DAMAGE.
|
* SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "tftpsubs.h"
|
||||||
|
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
/* static char sccsid[] = "@(#)tftpsubs.c 8.1 (Berkeley) 6/6/93"; */
|
/* static char sccsid[] = "@(#)tftpsubs.c 8.1 (Berkeley) 6/6/93"; */
|
||||||
/* static char rcsid[] = "$OpenBSD: tftpsubs.c,v 1.2 1996/06/26 05:40:36 deraadt Exp $"; */
|
/* static char rcsid[] = "$OpenBSD: tftpsubs.c,v 1.2 1996/06/26 05:40:36 deraadt Exp $"; */
|
||||||
static const char *rcsid = "tftp-hpa: $Id$";
|
static const char *rcsid UNUSED =
|
||||||
|
"tftp-hpa: $Id$";
|
||||||
#endif /* not lint */
|
#endif /* not lint */
|
||||||
|
|
||||||
/* Simple minded read-ahead/write-behind subroutines for tftp user and
|
/* Simple minded read-ahead/write-behind subroutines for tftp user and
|
||||||
|
@ -62,8 +65,6 @@ static const char *rcsid = "tftp-hpa: $Id$";
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
#include "tftpsubs.h"
|
|
||||||
|
|
||||||
#define PKTSIZE MAX_SEGSIZE+4 /* should be moved to tftp.h */
|
#define PKTSIZE MAX_SEGSIZE+4 /* should be moved to tftp.h */
|
||||||
|
|
||||||
int segsize = SEGSIZE; /* Default segsize */
|
int segsize = SEGSIZE; /* Default segsize */
|
||||||
|
|
|
@ -47,6 +47,9 @@
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <signal.h>
|
||||||
|
#include <setjmp.h>
|
||||||
|
#include "../config.h"
|
||||||
|
|
||||||
struct tftphdr;
|
struct tftphdr;
|
||||||
|
|
||||||
|
@ -69,6 +72,17 @@ extern int segsize;
|
||||||
extern void *xmalloc(size_t);
|
extern void *xmalloc(size_t);
|
||||||
extern char *xstrdup(const char *);
|
extern char *xstrdup(const char *);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Signal-related stuff
|
||||||
|
*/
|
||||||
|
void bsd_signal(int, void (*)(int));
|
||||||
|
|
||||||
|
#ifndef HAVE_SIGSETJMP
|
||||||
|
#define sigsetjmp(x,y) setjmp(x)
|
||||||
|
#define siglongjmp(x,y) longjmp(x,y)
|
||||||
|
#define sigjmp_buf jmp_buf
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* How to annotate unused variables
|
* How to annotate unused variables
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -775,8 +775,9 @@ void
|
||||||
sendfile(struct formats *pf, struct tftphdr *oap, int oacklen)
|
sendfile(struct formats *pf, struct tftphdr *oap, int oacklen)
|
||||||
{
|
{
|
||||||
struct tftphdr *dp;
|
struct tftphdr *dp;
|
||||||
struct tftphdr *ap; /* ack packet */
|
struct tftphdr *ap; /* ack packet */
|
||||||
int block = 1, size, n;
|
static int block = 1; /* Static to avoid longjmp funnies */
|
||||||
|
int size, n;
|
||||||
|
|
||||||
ap = (struct tftphdr *)ackbuf;
|
ap = (struct tftphdr *)ackbuf;
|
||||||
|
|
||||||
|
@ -882,8 +883,10 @@ void
|
||||||
recvfile(struct formats *pf, struct tftphdr *oap, int oacklen)
|
recvfile(struct formats *pf, struct tftphdr *oap, int oacklen)
|
||||||
{
|
{
|
||||||
struct tftphdr *dp;
|
struct tftphdr *dp;
|
||||||
struct tftphdr *ap; /* ack buffer */
|
int n, size;
|
||||||
int block = 0, acksize, n, size;
|
/* These are "static" to avoid longjmp funnies */
|
||||||
|
static struct tftphdr *ap; /* ack buffer */
|
||||||
|
static int block = 0, acksize;
|
||||||
|
|
||||||
dp = w_init();
|
dp = w_init();
|
||||||
do {
|
do {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue