Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH PUSHED] Fix missing-prototypes warnings in gnu-nat.c
@ 2014-02-17  3:36 Yao Qi
  2014-02-17  7:41 ` Thomas Schwinge
  0 siblings, 1 reply; 2+ messages in thread
From: Yao Qi @ 2014-02-17  3:36 UTC (permalink / raw)
  To: gdb-patches; +Cc: thomas

A recent change (commit 3398af6aa352b0611bc9d66aed72080a876e42d4)
in gnu-nat.c causes the some missing-prototypes warnings,

../../../git/gdb/gnu-nat.c:1864:1: error: no previous prototype for 'S_proc_pid2task_reply' [-Werror=missing-prototypes]
../../../git/gdb/gnu-nat.c:1866:1: error: no previous prototype for 'S_proc_task2pid_reply' [-Werror=missing-prototypes]
../../../git/gdb/gnu-nat.c:1868:1: error: no previous prototype for 'S_proc_task2proc_reply' [-Werror=missing-prototypes]

A new macro ILL_RPC was added, which defines some external
functions.  However, they are not declared and GCC complains about this.

This patch is to add the declarations of these external function in
macro ILL_RPC.  Pushed it as obvious.

gdb:

2014-02-17  Yao Qi  <yao@codesourcery.com>

	* gnu-nat.c (ILL_RPC): Declare defined function.
---
 gdb/ChangeLog |    4 ++++
 gdb/gnu-nat.c |    1 +
 2 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index b28201e..9af1319 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,9 @@
 2014-02-17  Yao Qi  <yao@codesourcery.com>
 
+	* gnu-nat.c (ILL_RPC): Declare defined function.
+
+2014-02-17  Yao Qi  <yao@codesourcery.com>
+
 	* gnu-nat.c (gnu_read_inferior): Change 'copy_count' type to
 	mach_msg_type_number_t.
 	(gnu_write_inferior): Likewise.
diff --git a/gdb/gnu-nat.c b/gdb/gnu-nat.c
index e4140e0..ac98193 100644
--- a/gdb/gnu-nat.c
+++ b/gdb/gnu-nat.c
@@ -1783,6 +1783,7 @@ do_mach_notify_dead_name (mach_port_t notify, mach_port_t dead_port)
 
 \f
 #define ILL_RPC(fun, ...) \
+  extern kern_return_t fun (__VA_ARGS__); \
   kern_return_t fun (__VA_ARGS__) \
   { \
     warning (_("illegal rpc: %s"), #fun); \
-- 
1.7.7.6


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-02-17  7:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-17  3:36 [PATCH PUSHED] Fix missing-prototypes warnings in gnu-nat.c Yao Qi
2014-02-17  7:41 ` Thomas Schwinge

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox