Fix missing-prototypes warnings in gnu-nat.c
authorYao Qi <yao@codesourcery.com>
Mon, 17 Feb 2014 03:20:35 +0000 (11:20 +0800)
committerYao Qi <yao@codesourcery.com>
Mon, 17 Feb 2014 03:26:12 +0000 (11:26 +0800)
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 recently, 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.

gdb:

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

* gnu-nat.c (ILL_RPC): Declare defined function.

gdb/ChangeLog
gdb/gnu-nat.c

index b28201e6cac60855dfb65e611861ca45ab864bf9..9af131973885d9ce31ae2a5dc59153cdaafd181b 100644 (file)
@@ -1,3 +1,7 @@
+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
index e4140e038253f839777b377de1b98be0a6dc8dda..ac981931247b51fb175243ac38a1835dbf1743cd 100644 (file)
@@ -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); \
This page took 0.027323 seconds and 4 git commands to generate.