Re: [PATCH 3/6] ddb/db_break.c (db_delete_cmd): add missing returns
Marin Ramesa, le Sun 15 Dec 2013 22:38:29 +0100, a écrit : > On 15.12.2013 20:25:24, Samuel Thibault wrote: > > Marin Ramesa, le Sun 15 Dec 2013 20:22:02 +0100, a écrit : > > > On 15.12.2013 20:14:03, Samuel Thibault wrote: > > > > Marin Ramesa, le Thu 12 Dec 2013 18:27:05 +0100, a écrit : > > > > > There is a code path when db_error() can return. > > > > > > > > Which one? > > > > > > When _longjmp() > > > > _longjmp never returns. > > GCC seems to think it can return and I was fooled by that comment in > _setjmp.S. Anyway, writing returns quiets the warning. Still that's not the really most proper to fix it. longjmp really does never return, so just mark it as such and gcc will stop thinking it can return. Samuel
Re: [PATCH 3/6] ddb/db_break.c (db_delete_cmd): add missing returns
On 15.12.2013 20:25:24, Samuel Thibault wrote: > Marin Ramesa, le Sun 15 Dec 2013 20:22:02 +0100, a écrit : > > On 15.12.2013 20:14:03, Samuel Thibault wrote: > > > Marin Ramesa, le Thu 12 Dec 2013 18:27:05 +0100, a écrit : > > > > There is a code path when db_error() can return. > > > > > > Which one? > > > > When _longjmp() > > _longjmp never returns. GCC seems to think it can return and I was fooled by that comment in _setjmp.S. Anyway, writing returns quiets the warning.
Re: [PATCH 3/6] ddb/db_break.c (db_delete_cmd): add missing returns
Marin Ramesa, le Sun 15 Dec 2013 20:22:02 +0100, a écrit : > On 15.12.2013 20:14:03, Samuel Thibault wrote: > > Marin Ramesa, le Thu 12 Dec 2013 18:27:05 +0100, a écrit : > > > There is a code path when db_error() can return. > > > > Which one? > > When _longjmp() _longjmp never returns. Samuel
Re: [PATCH 3/6] ddb/db_break.c (db_delete_cmd): add missing returns
On 15.12.2013 20:14:03, Samuel Thibault wrote: > Marin Ramesa, le Thu 12 Dec 2013 18:27:05 +0100, a écrit : > > There is a code path when db_error() can return. > > Which one? When _longjmp() returns and db_recover and argument to db_error() are non-zero.
Re: [PATCH 3/6] ddb/db_break.c (db_delete_cmd): add missing returns
Marin Ramesa, le Thu 12 Dec 2013 18:27:05 +0100, a écrit : > There is a code path when db_error() can return. Which one? Samuel