sim/common/gentmap.c: Include "string.h".

Message ID 54DD1ED6.2070100@sunrus.com.cn
State Committed
Headers

Commit Message

Chen Gang Feb. 12, 2015, 9:44 p.m. UTC
  The related warnings:

  gcc ../../../binutils-gdb/sim/mcore/../common/gentmap.c -o gentmap -g -O -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
  ../../../binutils-gdb/sim/mcore/../common/gentmap.c: In function ‘main’:
  ../../../binutils-gdb/sim/mcore/../common/gentmap.c:119:7: warning: implicit declaration of function ‘strcmp’ [-Wimplicit-function-declaration]
     if (strcmp (argv[1], "-h") == 0)
         ^

2015-02-13  Chen Gang  <gang.chen.5i5j@gmail.com>

	*  gentmap.c: Include "string.h".
---
 sim/common/ChangeLog | 4 ++++
 sim/common/gentmap.c | 1 +
 2 files changed, 5 insertions(+)
  

Comments

Joel Brobecker Feb. 13, 2015, 3:37 p.m. UTC | #1
On Fri, Feb 13, 2015 at 05:44:54AM +0800, Chen Gang S wrote:
> The related warnings:
> 
>   gcc ../../../binutils-gdb/sim/mcore/../common/gentmap.c -o gentmap -g -O -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
>   ../../../binutils-gdb/sim/mcore/../common/gentmap.c: In function ‘main’:
>   ../../../binutils-gdb/sim/mcore/../common/gentmap.c:119:7: warning: implicit declaration of function ‘strcmp’ [-Wimplicit-function-declaration]
>      if (strcmp (argv[1], "-h") == 0)
>          ^
> 
> 2015-02-13  Chen Gang  <gang.chen.5i5j@gmail.com>
> 
> 	*  gentmap.c: Include "string.h".

OK to push.

Thank you,
  

Patch

diff --git a/sim/common/ChangeLog b/sim/common/ChangeLog
index 0fdef42..7acc03c 100644
--- a/sim/common/ChangeLog
+++ b/sim/common/ChangeLog
@@ -1,3 +1,7 @@ 
+2015-02-13  Chen Gang  <gang.chen.5i5j@gmail.com>
+
+	*  gentmap.c: Include "string.h".
+
 2015-01-07  Joel Brobecker  <brobecker@adacore.com>
 
 	* aclocal.m4, configure: Regenerate using automake 1.11.1.
diff --git a/sim/common/gentmap.c b/sim/common/gentmap.c
index 7efc6d3..1769c53 100644
--- a/sim/common/gentmap.c
+++ b/sim/common/gentmap.c
@@ -2,6 +2,7 @@ 
 
 #include <stdio.h>
 #include <stdlib.h>
+#include <string.h>
 
 struct tdefs {
   char *symbol;