From patchwork Sat Feb 7 14:19:40 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Chen Gang X-Patchwork-Id: 4953 Received: (qmail 20375 invoked by alias); 7 Feb 2015 14:12:05 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 19654 invoked by uid 89); 7 Feb 2015 14:12:05 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL, BAYES_00, UNPARSEABLE_RELAY autolearn=ham version=3.3.2 X-HELO: out1134-194.mail.aliyun.com Received: from out1134-194.mail.aliyun.com (HELO out1134-194.mail.aliyun.com) (42.120.134.194) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 07 Feb 2015 14:11:58 +0000 X-Alimail-AntiSpam: AC=CONTINUE; BC=0.07946592|-1; FP=0|0|0|0|0|-1|-1|-1; HT=r41g03024; MF=gang.chen@sunrus.com.cn; PH=DS; RN=1; RT=1; SR=0; Received: from ShengShiZhuChengdeMacBook-Pro.local(mailfrom:gang.chen@sunrus.com.cn ip:223.72.65.5) by smtp.aliyun-inc.com(10.147.38.220); Sat, 07 Feb 2015 22:11:52 +0800 Message-ID: <54D61EFC.3040000@sunrus.com.cn> Date: Sat, 07 Feb 2015 22:19:40 +0800 From: Chen Gang S User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: gdb-patches@sourceware.org Subject: [PATCH] sim/mcore/interp.c: Include "unistd.h" standard C header file to avoid compiling warnings. The related warnings: gcc -DHAVE_CONFIG_H -DPROFILE=1 -DWITH_PROFILE=-1 -DDEFAULT_INLINE=0 -I. -I../../../binutils-gdb/sim/mcore -I../common -I../../../binutils-gdb/sim/mcore/../common -I../../include -I../../../binutils-gdb/sim/mcore/../../include -I../../bfd -I../../../binutils-gdb/sim/mcore/../../bfd -I../../opcodes -I../../../binutils-gdb/sim/mcore/../../opcodes -g -O2 -c -o interp.o -MT interp.o -MMD -MP -MF .deps/interp.Tpo ../../../binutils-gdb/sim/mcore/interp.c ../../../binutils-gdb/sim/mcore/interp.c: In function ‘handle_trap1’: ../../../binutils-gdb/sim/mcore/interp.c:559:22: warning: implicit declaration of function ‘link’ [-Wimplicit-function-declaration] cpu.gr[RET1] = link ((char *) a[0], (char *) a[1]); ^ ../../../binutils-gdb/sim/mcore/interp.c:585:22: warning: implicit declaration of function ‘access’ [-Wimplicit-function-declaration] cpu.gr[RET1] = access ((char *) a[0], a[1]); ^ 2015-02-07 Chen Gang * mcore/interp.c: Include "unistd.h" standard C header file to avoid compiling warnings. --- sim/ChangeLog | 5 +++++ sim/mcore/interp.c | 1 + 2 files changed, 6 insertions(+) diff --git a/sim/ChangeLog b/sim/ChangeLog index a891ce5..8a05ff7 100644 --- a/sim/ChangeLog +++ b/sim/ChangeLog @@ -1,3 +1,8 @@ +2015-02-07 Chen Gang + + * mcore/interp.c: Include "unistd.h" standard C header file to + avoid compiling warnings. + 2015-02-02 Chen Gang * microblaze/interp.c (sim_do_command): Call freeargv() before diff --git a/sim/mcore/interp.c b/sim/mcore/interp.c index dfaa6aa..7e2be0d 100644 --- a/sim/mcore/interp.c +++ b/sim/mcore/interp.c @@ -23,6 +23,7 @@ along with this program. If not, see . */ #include #include #include /* for byte ordering macros */ +#include #include "bfd.h" #include "gdb/callback.h" #include "libiberty.h"