This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[ob] Make do_my_cleanups static
- From: Andrew Cagney <cagney at gnu dot org>
- To: gdb-patches at sources dot redhat dot com
- Date: Fri, 02 Jan 2004 12:36:01 -0500
- Subject: [ob] Make do_my_cleanups static
FYI,
Noticed this when reviewing Jeff's cleanup patch. Committed.
Andrew
2004-01-02 Andrew Cagney <cagney@redhat.com>
* utils.c (do_my_cleanups): Make static, add forward declaration.
* defs.h (do_my_cleanups): Delete declaration.
Index: defs.h
===================================================================
RCS file: /cvs/src/src/gdb/defs.h,v
retrieving revision 1.135
diff -u -r1.135 defs.h
--- defs.h 7 Dec 2003 17:22:29 -0000 1.135
+++ defs.h 2 Jan 2004 17:34:22 -0000
@@ -355,7 +355,6 @@
extern void do_cleanups (struct cleanup *);
extern void do_final_cleanups (struct cleanup *);
-extern void do_my_cleanups (struct cleanup **, struct cleanup *);
extern void do_run_cleanups (struct cleanup *);
extern void do_exec_cleanups (struct cleanup *);
extern void do_exec_error_cleanups (struct cleanup *);
Index: utils.c
===================================================================
RCS file: /cvs/src/src/gdb/utils.c,v
retrieving revision 1.110
diff -u -r1.110 utils.c
--- utils.c 21 Sep 2003 01:26:45 -0000 1.110
+++ utils.c 2 Jan 2004 17:34:24 -0000
@@ -96,6 +96,8 @@
static void fputs_maybe_filtered (const char *, struct ui_file *, int);
+static void do_my_cleanups (struct cleanup **, struct cleanup *);
+
#if defined (USE_MMALLOC) && !defined (NO_MMCHECK)
static void malloc_botch (void);
#endif
@@ -311,7 +313,7 @@
do_my_cleanups (&exec_error_cleanup_chain, old_chain);
}
-void
+static void
do_my_cleanups (struct cleanup **pmy_chain,
struct cleanup *old_chain)
{
Index: testsuite/gdb.base/fileio.c
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/fileio.c,v
retrieving revision 1.2
diff -u -r1.2 fileio.c
--- testsuite/gdb.base/fileio.c 14 Jun 2003 16:51:42 -0000 1.2
+++ testsuite/gdb.base/fileio.c 2 Jan 2004 17:34:24 -0000
@@ -103,7 +103,7 @@
close (ret);
/* Open for write but no write permission */
errno = 0;
- ret = open (NOWRITE, O_CREAT | O_RDONLY, S_IRUSR | S_IWUSR);
+ ret = open (NOWRITE, O_CREAT | O_RDONLY, S_IRUSR);
if (ret >= 0)
{
close (ret);