mirror_zfs/tests/zfs-tests/cmd
Alejandro Colomar db7f1a91de
Use _Noreturn (C11; GNU89) properly
A function that returns with no value is a different thing from a
function that doesn't return at all.  Those are two orthogonal
concepts, commonly confused.

pthread_create(3) expects a pointer to a start routine that has a
very precise prototype:

    void *(*start_routine)(void *);

However, other thread functions, such as kernel ones, expect:

    void (*start_routine)(void *);

Providing a different one is incorrect, and has only been working
because the ABIs happen to produce a compatible function.

We should use '_Noreturn void', since it's the natural type, and
then provide a '_Noreturn void *' wrapper for pthread functions.

For consistency, replace most cases of __NORETURN or
__attribute__((noreturn)) by _Noreturn.  _Noreturn is understood
by -std=gnu89, so it should be safe to use everywhere.

Ref: https://github.com/openzfs/zfs/pull/13110#discussion_r808450136
Ref: https://software.codidact.com/posts/285972
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Co-authored-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Closes #13120
2022-03-04 16:25:22 -08:00
..
badsend Drop references when skipping dmu_send due to EXDEV 2020-09-30 13:19:49 -07:00
btree_test tests: fix unused, remove argsused 2021-12-21 12:05:12 -08:00
chg_usr_exec Add the ZFS Test Suite 2016-03-16 13:46:16 -07:00
devname2devid ZTS: Fix devname2devid build on FreeBSD with libudev 2020-07-22 10:49:22 -07:00
dir_rd_update Use cstyle -cpP in make cstyle check 2016-12-12 10:46:26 -08:00
draid Fix trivial calloc(3) arguments order 2022-02-02 11:27:35 -08:00
file_check tests/file_check: remove unused variable 2021-06-07 20:59:01 -07:00
file_trunc Enable remaining tests 2017-05-22 12:34:32 -04:00
file_write Fix various typos 2021-04-02 18:52:15 -07:00
get_diff Add missing .gitignore from "Implement Redacted Send/Receive" 2019-06-23 11:51:29 -07:00
getversion Linux: Implement FS_IOC_GETVERSION 2021-12-17 16:18:37 -08:00
largest_file tests: fix unused, remove argsused 2021-12-21 12:05:12 -08:00
libzfs_input_check Add const to nvlist functions to properly expose their real behavior 2021-12-06 18:19:13 -07:00
mkbusy Use _Noreturn (C11; GNU89) properly 2022-03-04 16:25:22 -08:00
mkfile Use _Noreturn (C11; GNU89) properly 2022-03-04 16:25:22 -08:00
mkfiles Update ZTS to work on FreeBSD 2019-12-18 12:29:43 -08:00
mktree Update ZTS to work on FreeBSD 2019-12-18 12:29:43 -08:00
mmap_exec Enable remaining tests 2017-05-22 12:34:32 -04:00
mmap_libaio tests: fix unused, remove argsused 2021-12-21 12:05:12 -08:00
mmap_seek zfs-test/mmap_seek: fix build on musl 2021-12-21 16:44:18 -08:00
mmapwrite Prune /*NOTREACHED*/ 2021-07-26 12:07:26 -07:00
nvlist_to_lua Add const to nvlist functions to properly expose their real behavior 2021-12-06 18:19:13 -07:00
randfree_file Fix coverity defects: CID 147692, 147693, 147694 2016-10-13 14:38:59 -07:00
randwritecomp OpenZFS 9166 - zfs storage pool checkpoint 2018-06-26 10:07:42 -07:00
readmmap Add the ZFS Test Suite 2016-03-16 13:46:16 -07:00
rename_dir tests: fix unused, remove argsused 2021-12-21 12:05:12 -08:00
rm_lnkcnt_zero_file tests: fix unused, remove argsused 2021-12-21 12:05:12 -08:00
send_doall send_iterate_snap : doall send without fromsnap 2021-02-24 09:48:58 -08:00
stride_dd Implement Redacted Send/Receive 2019-06-19 09:48:12 -07:00
threadsappend Add the ZFS Test Suite 2016-03-16 13:46:16 -07:00
user_ns_exec Take user namespaces into account in policy checks 2018-03-07 15:40:42 -08:00
xattrtest tests: fix unused, remove argsused 2021-12-21 12:05:12 -08:00
file_common.h Enable remaining tests 2017-05-22 12:34:32 -04:00
Makefile.am Linux: Implement FS_IOC_GETVERSION 2021-12-17 16:18:37 -08:00