[0/1] gdb, testsuite: add missing return statements

Message ID 20241129162802.1216434-1-stephan.rohr@intel.com
Headers
Series gdb, testsuite: add missing return statements |

Message

Rohr, Stephan Nov. 29, 2024, 4:28 p.m. UTC
  Hi all,

this patch adds missing return statements in 

  * gdb.threads/process-exit-status-is-leader-exit-status.c
  * gdb.threads/next-fork-exec-other-thread.c

These are just cosmetics changes to omit compiler warnings, e.g.:

$ gcc -Wall process-exit-status-is-leader-exit-status.c
process-exit-status-is-leader-exit-status.c: In function ‘start’:
process-exit-status-is-leader-exit-status.c:46:1: warning: no return statement
in function returning non-void [-Wreturn-type]
   46 | }
      | ^

I appreciate your feedback.

Thanks
Stephan

Rohr, Stephan (1):
  testsuite, threads: add missing return statements

 gdb/testsuite/gdb.threads/next-fork-exec-other-thread.c       | 4 ++++
 .../gdb.threads/process-exit-status-is-leader-exit-status.c   | 1 +
 2 files changed, 5 insertions(+)
  

Comments

Simon Marchi Nov. 29, 2024, 5:32 p.m. UTC | #1
On 2024-11-29 11:28, Stephan Rohr wrote:
> Hi all,
> 
> this patch adds missing return statements in 
> 
>   * gdb.threads/process-exit-status-is-leader-exit-status.c
>   * gdb.threads/next-fork-exec-other-thread.c
> 
> These are just cosmetics changes to omit compiler warnings, e.g.:
> 
> $ gcc -Wall process-exit-status-is-leader-exit-status.c
> process-exit-status-is-leader-exit-status.c: In function ‘start’:
> process-exit-status-is-leader-exit-status.c:46:1: warning: no return statement
> in function returning non-void [-Wreturn-type]
>    46 | }
>       | ^
> 
> I appreciate your feedback.

Thanks, this is OK:

Approved-By: Simon Marchi <simon.marchi@efficios.com>

However, I suggest to put the information up there (notably the compiler
warning) in the commit message.  For a single patch like this, you don't
really need a cover letter, all the info can be in the commit message,
where it will be kept for eternity in the git repo.

Simon