aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2000-03-29 00:51:17 +0000
committerAndrew Cagney <cagney@redhat.com>2000-03-29 00:51:17 +0000
commit80ce1ecb70abc7e20c1e7b6db8f2ead5c603be30 (patch)
tree34d6bfef9efa09f4b843220ee837359390a2c15a /gdb
parent692590c19f459c379c6e13f83448ad5d11ebf1ed (diff)
downloadgdb-80ce1ecb70abc7e20c1e7b6db8f2ead5c603be30.zip
gdb-80ce1ecb70abc7e20c1e7b6db8f2ead5c603be30.tar.gz
gdb-80ce1ecb70abc7e20c1e7b6db8f2ead5c603be30.tar.bz2
Fix various GCC warnings.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog7
-rw-r--r--gdb/breakpoint.c2
-rw-r--r--gdb/breakpoint.h4
-rw-r--r--gdb/maint.c6
4 files changed, 16 insertions, 3 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 44d8c63..2e333f8 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,10 @@
+Wed Mar 29 10:16:35 2000 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * breakpoint.h (remove_hw_watchpoints): Add declaration.
+ * breakpoints.c (remove_hw_watchpoints): Update.
+ * maint.c (maintenance_do_deprecate): Avoid assignment within IF
+ condition.
+
2000-03-28 Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
breakpoint.c, breakpoint.h (remove_hw_watchpoints): New function.
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index 768a67f..1efa23b 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -1096,7 +1096,7 @@ remove_breakpoints ()
}
int
-remove_hw_watchpoints ()
+remove_hw_watchpoints (void)
{
register struct breakpoint *b;
int val;
diff --git a/gdb/breakpoint.h b/gdb/breakpoint.h
index f8358a9..1b4e02a 100644
--- a/gdb/breakpoint.h
+++ b/gdb/breakpoint.h
@@ -693,4 +693,8 @@ extern struct breakpoint *set_breakpoint_sal PARAMS ((struct symtab_and_line));
deletes all breakpoints. */
extern void delete_command (char *arg, int from_tty);
+/* Pull all H/W watchpoints from the target. Return non-zero if the
+ remove fails. */
+extern int remove_hw_watchpoints (void);
+
#endif /* !defined (BREAKPOINT_H) */
diff --git a/gdb/maint.c b/gdb/maint.c
index dd974b7..8a8df59 100644
--- a/gdb/maint.c
+++ b/gdb/maint.c
@@ -425,10 +425,12 @@ maintenance_do_deprecate (char *text, int deprecate)
if (deprecate)
{
/* look for a replacement command */
- if (start_ptr = strchr (text, '\"'))
+ start_ptr = strchr (text, '\"');
+ if (start_ptr != NULL)
{
start_ptr++;
- if (end_ptr = strrchr (start_ptr, '\"'))
+ end_ptr = strrchr (start_ptr, '\"');
+ if (end_ptr != NULL)
{
len = end_ptr - start_ptr;
start_ptr[len] = '\0';