Quiet warnings by making this ANSI-C clean.

This commit is contained in:
David E. O'Brien 2002-07-09 17:01:47 +00:00
parent 455a6759e8
commit a841c6d1fa

View File

@ -19,6 +19,8 @@
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* $FreeBSD$ */
#include "config.h"
#include <stdio.h>
#include <sys/file.h>
@ -30,6 +32,15 @@
#include <ctype.h>
#include <fcntl.h>
#include <errno.h>
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#ifdef HAVE_STRING_H
#include <string.h>
#endif
/* Sort of a hack... */
#define EOL (EOF - 1)
@ -40,7 +51,7 @@ static int remote_desc;
as the file name for which the error was encountered.
Then return to command level. */
void
static void
perror_with_name (char *string)
{
#ifndef STDC_HEADERS
@ -71,7 +82,7 @@ sync_error (FILE *fp, char *desc, int expect, int got)
exit (1);
}
void
static void
remote_close (void)
{
close (remote_desc);
@ -80,10 +91,12 @@ remote_close (void)
/* Open a connection to a remote debugger.
NAME is the filename used for communication. */
void
static void
remote_open (char *name)
{
#ifndef HAVE_STRING_H
extern char *strchr ();
#endif
if (!strchr (name, ':'))
{
@ -230,7 +243,7 @@ logchar (FILE *fp)
/* Accept input from gdb and match with chars from fp (after skipping one
blank) up until a \n is read from fp (which is not matched) */
void
static void
expect (FILE *fp)
{
int fromlog;
@ -261,7 +274,7 @@ expect (FILE *fp)
/* Play data back to gdb from fp (after skipping leading blank) up until a
\n is read from fp (which is discarded and not sent to gdb). */
void
static void
play (FILE *fp)
{
int fromlog;