* [PATCH] gdbreplay.c
@ 2002-07-09 10:33 David O'Brien
2002-07-09 10:36 ` Daniel Jacobowitz
0 siblings, 1 reply; 3+ messages in thread
From: David O'Brien @ 2002-07-09 10:33 UTC (permalink / raw)
To: gdb-patches
I'd like to commit this change.
This seems more proper for the includes includes, and the staticization
is needed to quiet GCC at high warning levels.
Index: gdbreplay.c
===================================================================
RCS file: /cvs/src/src/gdb/gdbserver/gdbreplay.c,v
retrieving revision 1.6
diff -u -r1.6 gdbreplay.c
--- gdbreplay.c 9 Apr 2002 21:11:35 -0000 1.6
+++ gdbreplay.c 9 Jul 2002 17:23:26 -0000
@@ -30,12 +30,16 @@
#include <ctype.h>
#include <fcntl.h>
#include <errno.h>
-#include <stdlib.h>
-#include <unistd.h>
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
#ifdef HAVE_STRING_H
#include <string.h>
#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
/* Sort of a hack... */
#define EOL (EOF - 1)
@@ -46,7 +50,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
@@ -77,7 +81,7 @@
exit (1);
}
-void
+static void
remote_close (void)
{
close (remote_desc);
@@ -86,7 +90,7 @@
/* Open a connection to a remote debugger.
NAME is the filename used for communication. */
-void
+static void
remote_open (char *name)
{
if (!strchr (name, ':'))
@@ -234,7 +238,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;
@@ -265,7 +269,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;
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] gdbreplay.c
2002-07-09 10:33 [PATCH] gdbreplay.c David O'Brien
@ 2002-07-09 10:36 ` Daniel Jacobowitz
2002-07-09 12:49 ` David O'Brien
0 siblings, 1 reply; 3+ messages in thread
From: Daniel Jacobowitz @ 2002-07-09 10:36 UTC (permalink / raw)
To: David O'Brien; +Cc: gdb-patches
On Tue, Jul 09, 2002 at 10:25:41AM -0700, David O'Brien wrote:
> I'd like to commit this change.
>
> This seems more proper for the includes includes, and the staticization
> is needed to quiet GCC at high warning levels.
I'm not sure if you're asking or telling since it sounds like you've
committed the matching patch to the 5.2 branch?
In any case, no objection, so please commit it. But when does GCC warn
about a function not being static? Doesn't make a lot of sense to me;
it doesn't know that you won't link with -Bsymbolic and use DSO's, for
instance.
--
Daniel Jacobowitz Carnegie Mellon University
MontaVista Software Debian GNU/Linux Developer
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] gdbreplay.c
2002-07-09 10:36 ` Daniel Jacobowitz
@ 2002-07-09 12:49 ` David O'Brien
0 siblings, 0 replies; 3+ messages in thread
From: David O'Brien @ 2002-07-09 12:49 UTC (permalink / raw)
To: gdb-patches
On Tue, Jul 09, 2002 at 01:33:22PM -0400, Daniel Jacobowitz wrote:
> In any case, no objection, so please commit it. But when does GCC warn
> about a function not being static?
Gcc doesn't. :-) But making these functions static gets rid of these
warnings:
gdb/gdbserver/gdbreplay.c: At top level:
gdb/gdbserver/gdbreplay.c:85: warning: no previous prototype for `remote_open'
gdb/gdbserver/gdbreplay.c: In function `remote_open':
gdb/gdbserver/gdbreplay.c:86: warning: function declaration isn't a prototype
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2002-07-09 17:36 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-07-09 10:33 [PATCH] gdbreplay.c David O'Brien
2002-07-09 10:36 ` Daniel Jacobowitz
2002-07-09 12:49 ` David O'Brien
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox