aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorJim Kingdon <jkingdon@engr.sgi.com>1994-02-06 16:16:39 +0000
committerJim Kingdon <jkingdon@engr.sgi.com>1994-02-06 16:16:39 +0000
commit842cf83162c1af7297e83100361f1fc71708c12e (patch)
treeeb0a4166bfebc2b7c2d65e17e13214767e2819b7 /gdb
parent9f80c72bb1ea003bee8f2e7d9a0935ad41917e61 (diff)
downloadfsf-binutils-gdb-842cf83162c1af7297e83100361f1fc71708c12e.zip
fsf-binutils-gdb-842cf83162c1af7297e83100361f1fc71708c12e.tar.gz
fsf-binutils-gdb-842cf83162c1af7297e83100361f1fc71708c12e.tar.bz2
* corelow.c (solib_add_stub, core_open): Pass address of from_tty
rather than trying to shove an int into a pointer and back out again. This avoids compiler warnings.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog4
-rw-r--r--gdb/corelow.c11
2 files changed, 10 insertions, 5 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 8a07a0f..6e44d90 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,9 @@
Sun Feb 6 06:55:15 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
+ * corelow.c (solib_add_stub, core_open): Pass address of from_tty
+ rather than trying to shove an int into a pointer and back out
+ again. This avoids compiler warnings.
+
* defs.h (alloca): Declare as void *, not char *, on hpux.
Don't prototype it, just declare the return type.
diff --git a/gdb/corelow.c b/gdb/corelow.c
index 77a4d17..dbaf43f 100644
--- a/gdb/corelow.c
+++ b/gdb/corelow.c
@@ -70,13 +70,14 @@ core_close (quitting)
}
#ifdef SOLIB_ADD
-/* Stub function for catch_errors around shared library hacking. */
+/* Stub function for catch_errors around shared library hacking. FROM_TTYP
+ is really an int * which points to from_tty. */
static int
-solib_add_stub (from_tty)
- char *from_tty;
+solib_add_stub (from_ttyp)
+ char *from_ttyp;
{
- SOLIB_ADD (NULL, (int)from_tty, &core_ops);
+ SOLIB_ADD (NULL, *(int *)from_ttyp, &core_ops);
return 0;
}
#endif /* SOLIB_ADD */
@@ -194,7 +195,7 @@ core_open (filename, from_tty)
/* Add symbols and section mappings for any shared libraries */
#ifdef SOLIB_ADD
- catch_errors (solib_add_stub, (char *)from_tty, (char *)0,
+ catch_errors (solib_add_stub, &from_tty, (char *)0,
RETURN_MASK_ALL);
#endif