This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH 05/14] -Wmissing-prototypes: The encode_actions hack.
$ make WERROR_CFLAGS="-Wmissing-prototypes" tracepoint.o 1>/dev/null
[...]
../../src/gdb/tracepoint.c:1581:1: warning: no previous prototype for âencode_actionsâ [-Wmissing-prototypes]
[...]
This moves the declaration to the proper header...
2012-02-29 Pedro Alves <palves@redhat.com>
* remote.c (encode_actions): Delete declaration.
* tracepoint.c (encode_actions): Make extern.
* tracepoint.h (encode_actions): Declare.
---
gdb/remote.c | 3 ---
gdb/tracepoint.c | 3 ++-
gdb/tracepoint.h | 3 +++
3 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/gdb/remote.c b/gdb/remote.c
index 2719241..baa3dda 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -69,9 +69,6 @@
/* Temp hacks for tracepoint encoding migration. */
static char *target_buf;
static long target_buf_size;
-/*static*/ void
-encode_actions (struct breakpoint *t, struct bp_location *tloc,
- char ***tdp_actions, char ***stepping_actions);
/* The size to align memory write packets, when practical. The protocol
does not guarantee any alignment, and gdb will generate short
diff --git a/gdb/tracepoint.c b/gdb/tracepoint.c
index 37e1f52..824d572 100644
--- a/gdb/tracepoint.c
+++ b/gdb/tracepoint.c
@@ -1577,7 +1577,8 @@ encode_actions_1 (struct command_line *action,
}
/* Render all actions into gdb protocol. */
-/*static*/ void
+
+void
encode_actions (struct breakpoint *t, struct bp_location *tloc,
char ***tdp_actions, char ***stepping_actions)
{
diff --git a/gdb/tracepoint.h b/gdb/tracepoint.h
index 00c4d7c..4003c66 100644
--- a/gdb/tracepoint.h
+++ b/gdb/tracepoint.h
@@ -238,6 +238,9 @@ void free_actions (struct breakpoint *);
extern char *decode_agent_options (char *exp);
+extern void encode_actions (struct breakpoint *t, struct bp_location *tloc,
+ char ***tdp_actions, char ***stepping_actions);
+
extern void validate_actionline (char **, struct breakpoint *);
extern void end_actions_pseudocommand (char *args, int from_tty);