From: "David O'Brien" <obrien@FreeBSD.org>
To: gdb-patches@sources.redhat.com
Subject: [5.2.1] quiet warnings for gdbreplay.c
Date: Thu, 27 Jun 2002 20:47:00 -0000 [thread overview]
Message-ID: <20020627204720.A13445@dragon.nuxi.com> (raw)
OK to apply?
2002-06-27 David O'Brien <obrien@FreeBSD.org>
* gdbserver/gdbreplay.c: Include stdlib.h, unistd.h, and string.h
if they exist. Static'ize internal functions to quiet warnings.
Index: gdbserver/gdbreplay.c
===================================================================
RCS file: /cvs/src/src/gdb/gdbserver/gdbreplay.c,v
retrieving revision 1.4.10.1
diff -u -r1.4.10.1 gdbreplay.c
--- gdbserver/gdbreplay.c 29 Mar 2002 19:03:34 -0000 1.4.10.1
+++ gdbserver/gdbreplay.c 28 Jun 2002 03:46:28 -0000
@@ -30,6 +30,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 +49,7 @@
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 +80,7 @@
exit (1);
}
-void
+static void
remote_close (void)
{
close (remote_desc);
@@ -80,10 +89,12 @@
/* 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 +241,7 @@
/* 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 +272,7 @@
/* 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;
next reply other threads:[~2002-06-28 3:47 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-06-27 20:47 David O'Brien [this message]
2002-06-28 9:12 ` Andrew Cagney
2002-06-28 11:08 ` Daniel Jacobowitz
2002-06-28 11:38 ` David O'Brien
2002-06-28 14:20 ` Andrew Cagney
2002-06-28 14:39 ` Daniel Jacobowitz
2002-07-09 14:15 ` Andrew Cagney
2003-06-21 17:40 ` Daniel Jacobowitz
2003-06-21 17:54 ` Andrew Cagney
2003-06-21 18:07 ` Daniel Jacobowitz
2003-06-22 3:25 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20020627204720.A13445@dragon.nuxi.com \
--to=obrien@freebsd.org \
--cc=gdb-patches@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox