diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2014-05-31 16:56:00 -0400 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2014-06-02 08:15:27 -0400 |
commit | b469f1e0fc5f0ac882161e627a1255ee11e67c37 (patch) | |
tree | ea5f4b46c4b6fbe58ded80930b2f5d0aae02d3d0 /thread.h | |
parent | 0c2c57a86cc6ec5688af5df66a8b8929f97ac491 (diff) | |
download | perl-b469f1e0fc5f0ac882161e627a1255ee11e67c37.tar.gz |
Use PERL_UNUSED_RESULT.
(1) Enhance its description.
(2) Simplify it: define only if has warn_unused_result.
(3) Make it use STMT_START { ... } STMT_END to be less GNU-extensiony.
(4) Redo 04783dc7 ("fix 'ignoring return value' compiler warnings") with it.
Diffstat (limited to 'thread.h')
-rw-r--r-- | thread.h | 4 |
1 files changed, 1 insertions, 3 deletions
@@ -336,9 +336,7 @@ # define ALLOC_THREAD_KEY \ STMT_START { \ if (pthread_key_create(&PL_thr_key, 0)) { \ - int rc; \ - rc = write(2, STR_WITH_LEN("panic: pthread_key_create failed\n")); \ - PERL_UNUSED_VAR(rc); \ + PERL_UNUSED_RESULT(write(2, STR_WITH_LEN("panic: pthread_key_create failed\n"))); \ exit(1); \ } \ } STMT_END |