public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] sim/mcore/interp.c: Include "unistd.h" standard C header file to avoid compiling warnings.
@ 2015-02-07 14:12 Chen Gang S
  2015-02-07 23:22 ` Doug Evans
  0 siblings, 1 reply; 9+ messages in thread
From: Chen Gang S @ 2015-02-07 14:12 UTC (permalink / raw)
  To: gdb-patches

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 <gang.chen.5i5j@gmail.com>

	* 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 <gang.chen.5i5j@gmail.com>
+
+	* mcore/interp.c: Include "unistd.h" standard C header file to
+	avoid compiling warnings.
+
 2015-02-02  Chen Gang <gang.chen.5i5j@gmail.com>
 
 	* 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 <http://www.gnu.org/licenses/>.  */
 #include <sys/times.h>
 #include <sys/param.h>
 #include <netinet/in.h>	/* for byte ordering macros */
+#include <unistd.h>
 #include "bfd.h"
 #include "gdb/callback.h"
 #include "libiberty.h"
-- 
1.9.3

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

* Re: [PATCH] sim/mcore/interp.c: Include "unistd.h" standard C header file to avoid compiling warnings.
  2015-02-07 14:12 [PATCH] sim/mcore/interp.c: Include "unistd.h" standard C header file to avoid compiling warnings Chen Gang S
@ 2015-02-07 23:22 ` Doug Evans
  2015-02-07 23:54   ` Chen Gang S
  0 siblings, 1 reply; 9+ messages in thread
From: Doug Evans @ 2015-02-07 23:22 UTC (permalink / raw)
  To: Chen Gang S; +Cc: gdb-patches

On Sat, Feb 7, 2015 at 6:19 AM, Chen Gang S <gang.chen@sunrus.com.cn> wrote:
> 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 <gang.chen.5i5j@gmail.com>
>
>         * mcore/interp.c: Include "unistd.h" standard C header file to
>         avoid compiling warnings.

LGTM

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

* Re: [PATCH] sim/mcore/interp.c: Include "unistd.h" standard C header file to avoid compiling warnings.
  2015-02-07 23:22 ` Doug Evans
@ 2015-02-07 23:54   ` Chen Gang S
  2015-02-08  0:35     ` Doug Evans
  0 siblings, 1 reply; 9+ messages in thread
From: Chen Gang S @ 2015-02-07 23:54 UTC (permalink / raw)
  To: Doug Evans; +Cc: gdb-patches

On 2/8/15 07:22, Doug Evans wrote:
> On Sat, Feb 7, 2015 at 6:19 AM, Chen Gang S <gang.chen@sunrus.com.cn> wrote:
>> 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 <gang.chen.5i5j@gmail.com>
>>
>>         * mcore/interp.c: Include "unistd.h" standard C header file to
>>         avoid compiling warnings.
> 
> LGTM

Excuse me, I am not quite familiar with the short word, I guess it is "
Look Good To ME",

Is what I guess correct?


Thanks.
-- 
Chen Gang

Open, share, and attitude like air, water, and life which God blessed

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

* Re: [PATCH] sim/mcore/interp.c: Include "unistd.h" standard C header file to avoid compiling warnings.
  2015-02-07 23:54   ` Chen Gang S
@ 2015-02-08  0:35     ` Doug Evans
  2015-02-08  1:32       ` Chen Gang S
  0 siblings, 1 reply; 9+ messages in thread
From: Doug Evans @ 2015-02-08  0:35 UTC (permalink / raw)
  To: Chen Gang S; +Cc: gdb-patches

On Sat, Feb 7, 2015 at 4:02 PM, Chen Gang S <gang.chen@sunrus.com.cn> wrote:
> On 2/8/15 07:22, Doug Evans wrote:
>> On Sat, Feb 7, 2015 at 6:19 AM, Chen Gang S <gang.chen@sunrus.com.cn> wrote:
>>> 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 <gang.chen.5i5j@gmail.com>
>>>
>>>         * mcore/interp.c: Include "unistd.h" standard C header file to
>>>         avoid compiling warnings.
>>
>> LGTM
>
> Excuse me, I am not quite familiar with the short word, I guess it is "
> Look Good To ME",
>
> Is what I guess correct?

Looks Good To Me,
yeah

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

* Re: [PATCH] sim/mcore/interp.c: Include "unistd.h" standard C header file to avoid compiling warnings.
  2015-02-08  0:35     ` Doug Evans
@ 2015-02-08  1:32       ` Chen Gang S
  2015-02-08 16:00         ` Joel Brobecker
  0 siblings, 1 reply; 9+ messages in thread
From: Chen Gang S @ 2015-02-08  1:32 UTC (permalink / raw)
  To: Doug Evans; +Cc: gdb-patches

On 2/8/15 08:35, Doug Evans wrote:
> On Sat, Feb 7, 2015 at 4:02 PM, Chen Gang S <gang.chen@sunrus.com.cn> wrote:
>> On 2/8/15 07:22, Doug Evans wrote:
>>> On Sat, Feb 7, 2015 at 6:19 AM, Chen Gang S <gang.chen@sunrus.com.cn> wrote:
>>>> 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 <gang.chen.5i5j@gmail.com>
>>>>
>>>>         * mcore/interp.c: Include "unistd.h" standard C header file to
>>>>         avoid compiling warnings.
>>>
>>> LGTM
>>
>> Excuse me, I am not quite familiar with the short word, I guess it is "
>> Look Good To ME",
>>
>> Is what I guess correct?
> 
> Looks Good To Me,
> yeah


Thank you for your work, and I shall "git push" to main branch, if no
additional reply within 3 days (2015-02-10).

Thanks.
-- 
Chen Gang

Open, share, and attitude like air, water, and life which God blessed

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

* Re: [PATCH] sim/mcore/interp.c: Include "unistd.h" standard C header file to avoid compiling warnings.
  2015-02-08  1:32       ` Chen Gang S
@ 2015-02-08 16:00         ` Joel Brobecker
  2015-02-09  1:48           ` Chen Gang S
  0 siblings, 1 reply; 9+ messages in thread
From: Joel Brobecker @ 2015-02-08 16:00 UTC (permalink / raw)
  To: Chen Gang S; +Cc: Doug Evans, gdb-patches

> >>>> 2015-02-07  Chen Gang <gang.chen.5i5j@gmail.com>
> >>>>
> >>>>         * mcore/interp.c: Include "unistd.h" standard C header file to
> >>>>         avoid compiling warnings.

A couple of small procedural nits...

There is a ChangeLog file in sim/mcore, so this is the one that
should be updated, and thus the name of the file in the ChangeLog
entry should not have the "mcore/" part.

Also, the ChangeLog entry should only say "what" has been changed,
not "why". If you feel that the "why" needs to be provided, it should
be provided in the code. In this case, I feel that your revision log
is sufficient.

So, your ChangeLog entry should look like:

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

        * interp.c: Include "unistd.h".

-- 
Joel

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

* Re: [PATCH] sim/mcore/interp.c: Include "unistd.h" standard C header file to avoid compiling warnings.
  2015-02-08 16:00         ` Joel Brobecker
@ 2015-02-09  1:48           ` Chen Gang S
  2015-02-09  2:28             ` Joel Brobecker
  0 siblings, 1 reply; 9+ messages in thread
From: Chen Gang S @ 2015-02-09  1:48 UTC (permalink / raw)
  To: Joel Brobecker; +Cc: Doug Evans, gdb-patches

On 2/9/15 00:00, Joel Brobecker wrote:
>>>>>> 2015-02-07  Chen Gang <gang.chen.5i5j@gmail.com>
>>>>>>
>>>>>>         * mcore/interp.c: Include "unistd.h" standard C header file to
>>>>>>         avoid compiling warnings.
> 
> A couple of small procedural nits...
> 
> There is a ChangeLog file in sim/mcore, so this is the one that
> should be updated, and thus the name of the file in the ChangeLog
> entry should not have the "mcore/" part.
> 
> Also, the ChangeLog entry should only say "what" has been changed,
> not "why". If you feel that the "why" needs to be provided, it should
> be provided in the code. In this case, I feel that your revision log
> is sufficient.
> 
> So, your ChangeLog entry should look like:
> 
> 2015-02-07  Chen Gang <gang.chen.5i5j@gmail.com>
> 
>         * interp.c: Include "unistd.h".

OK, thanks. I guess, before "git push", I need send patch v2 to mailing
list.

If no any additional reply, I shall send patch v2 within 2015-02-10.

Thanks.
-- 
Chen Gang

Open, share, and attitude like air, water, and life which God blessed

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

* Re: [PATCH] sim/mcore/interp.c: Include "unistd.h" standard C header file to avoid compiling warnings.
  2015-02-09  1:48           ` Chen Gang S
@ 2015-02-09  2:28             ` Joel Brobecker
  2015-02-09 10:48               ` Chen Gang S
  0 siblings, 1 reply; 9+ messages in thread
From: Joel Brobecker @ 2015-02-09  2:28 UTC (permalink / raw)
  To: Chen Gang S; +Cc: Doug Evans, gdb-patches

> > 2015-02-07  Chen Gang <gang.chen.5i5j@gmail.com>
> > 
> >         * interp.c: Include "unistd.h".
> 
> OK, thanks. I guess, before "git push", I need send patch v2 to mailing
> list.
> 
> If no any additional reply, I shall send patch v2 within 2015-02-10.

The patch was approved and I had no comments on it, so no need to send
v2; just push.

-- 
Joel

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

* Re: [PATCH] sim/mcore/interp.c: Include "unistd.h" standard C header file to avoid compiling warnings.
  2015-02-09  2:28             ` Joel Brobecker
@ 2015-02-09 10:48               ` Chen Gang S
  0 siblings, 0 replies; 9+ messages in thread
From: Chen Gang S @ 2015-02-09 10:48 UTC (permalink / raw)
  To: Joel Brobecker; +Cc: Doug Evans, gdb-patches

On 2/9/15 10:28, Joel Brobecker wrote:
>>> 2015-02-07  Chen Gang <gang.chen.5i5j@gmail.com>
>>>
>>>         * interp.c: Include "unistd.h".
>>
>> OK, thanks. I guess, before "git push", I need send patch v2 to mailing
>> list.
>>
>> If no any additional reply, I shall send patch v2 within 2015-02-10.
> 
> The patch was approved and I had no comments on it, so no need to send
> v2; just push.
> 

I guess, I shall "git push" with the modified ChangeLog contents as
below (also the related patch comments need to be modified too):

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

	* interp.c: Include "unistd.h".


If no additional reply, I shall "git push" within 2015-02-11.

Thanks.
-- 
Chen Gang

Open, share, and attitude like air, water, and life which God blessed

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

end of thread, other threads:[~2015-02-09 10:48 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-07 14:12 [PATCH] sim/mcore/interp.c: Include "unistd.h" standard C header file to avoid compiling warnings Chen Gang S
2015-02-07 23:22 ` Doug Evans
2015-02-07 23:54   ` Chen Gang S
2015-02-08  0:35     ` Doug Evans
2015-02-08  1:32       ` Chen Gang S
2015-02-08 16:00         ` Joel Brobecker
2015-02-09  1:48           ` Chen Gang S
2015-02-09  2:28             ` Joel Brobecker
2015-02-09 10:48               ` Chen Gang S

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).