* ser-mingw.c will be failed to build on GCC4.4.
@ 2008-12-24 2:25 Masaki Muranaka
2008-12-24 3:34 ` Joel Brobecker
0 siblings, 1 reply; 3+ messages in thread
From: Masaki Muranaka @ 2008-12-24 2:25 UTC (permalink / raw)
To: gdb-patches
Hello,
Some functions in ser-mingw.c is declared with return value, with no return statement.
For example, console_select_thread(), pipe_select_thread(), file_select_thread().
This is not issue on GCC4.3 or below, but GCC4.4 treats them as warning.
I don't see how to fix these functions. Could someone review them?
--
Masaki Muranaka
Monami Software
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: ser-mingw.c will be failed to build on GCC4.4.
2008-12-24 2:25 ser-mingw.c will be failed to build on GCC4.4 Masaki Muranaka
@ 2008-12-24 3:34 ` Joel Brobecker
2008-12-25 2:37 ` Masaki Muranaka
0 siblings, 1 reply; 3+ messages in thread
From: Joel Brobecker @ 2008-12-24 3:34 UTC (permalink / raw)
To: Masaki Muranaka; +Cc: gdb-patches
> Some functions in ser-mingw.c is declared with return value, with no
> return statement. For example, console_select_thread(),
> pipe_select_thread(), file_select_thread().
All these functions are used as the initial function when creating
threads. According to the MS documentation, the return value is
used to determine whether the function was successful or not.
In our case, I think that the thing to do is to add a "return 0"
at the end.
--
Joel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: ser-mingw.c will be failed to build on GCC4.4.
2008-12-24 3:34 ` Joel Brobecker
@ 2008-12-25 2:37 ` Masaki Muranaka
0 siblings, 0 replies; 3+ messages in thread
From: Masaki Muranaka @ 2008-12-25 2:37 UTC (permalink / raw)
To: Joel Brobecker; +Cc: gdb-patches
Hello Joel,
Thanks for your comment.
I reviewed them after I sent mail.
Your idea is reasonable. It shut GCC4.4's warnings up.
The another solustion is to add noreturn attribute, I guess.
Anyway I'll send some patches later.
On 2008/12/24, at 12:33, Joel Brobecker wrote:
>> Some functions in ser-mingw.c is declared with return value, with no
>> return statement. For example, console_select_thread(),
>> pipe_select_thread(), file_select_thread().
>
> All these functions are used as the initial function when creating
> threads. According to the MS documentation, the return value is
> used to determine whether the function was successful or not.
> In our case, I think that the thing to do is to add a "return 0"
> at the end.
>
> --
> Joel
>
Masaki Muranaka
Monami Software
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-12-25 2:37 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-12-24 2:25 ser-mingw.c will be failed to build on GCC4.4 Masaki Muranaka
2008-12-24 3:34 ` Joel Brobecker
2008-12-25 2:37 ` Masaki Muranaka
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox