From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21670 invoked by alias); 17 Feb 2014 03:36:07 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 21612 invoked by uid 89); 17 Feb 2014 03:36:06 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.2 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 17 Feb 2014 03:36:05 +0000 Received: from svr-orw-fem-01.mgc.mentorg.com ([147.34.98.93]) by relay1.mentorg.com with esmtp id 1WFEzy-00062t-4U from Yao_Qi@mentor.com for gdb-patches@sourceware.org; Sun, 16 Feb 2014 19:36:02 -0800 Received: from SVR-ORW-FEM-03.mgc.mentorg.com ([147.34.97.39]) by svr-orw-fem-01.mgc.mentorg.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Sun, 16 Feb 2014 19:36:01 -0800 Received: from qiyao.dyndns.org.dyndns.org.dyndns.org (147.34.91.1) by svr-orw-fem-03.mgc.mentorg.com (147.34.97.39) with Microsoft SMTP Server id 14.2.247.3; Sun, 16 Feb 2014 19:36:01 -0800 From: Yao Qi To: CC: Subject: [PATCH PUSHED] Fix missing-prototypes warnings in gnu-nat.c Date: Mon, 17 Feb 2014 03:36:00 -0000 Message-ID: <1392608048-29308-1-git-send-email-yao@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain X-IsSubscribed: yes X-SW-Source: 2014-02/txt/msg00522.txt.bz2 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 * 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 + * gnu-nat.c (ILL_RPC): Declare defined function. + +2014-02-17 Yao Qi + * 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) #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