diff options
author | Jim Meyering <meyering@fb.com> | 2014-11-06 21:03:04 -0600 |
---|---|---|
committer | Jim Meyering <meyering@fb.com> | 2014-11-30 21:07:57 -0800 |
commit | e09428778d1eb17a157e73e369f8f966fbcc8842 (patch) | |
tree | 32a33edc2e6af9ff0bbd68d18394db24484e46bc | |
parent | 366b04cabde35bf06d1cb3c9b35d7f2f1d094aea (diff) | |
download | sed-e09428778d1eb17a157e73e369f8f966fbcc8842.tar.gz |
maint: add _Noreturn attribute to two functions
This avoids two gcc may-be-noreturn warnings:
* sed/sed.h (bad_prog): Add _Noreturn attribute.
* sed/utils.h (panic): Likewise.
-rw-r--r-- | sed/sed.h | 2 | ||||
-rw-r--r-- | sed/utils.h | 2 |
2 files changed, 2 insertions, 2 deletions
@@ -181,7 +181,7 @@ struct sed_cmd { -void bad_prog (const char *why); +_Noreturn void bad_prog (const char *why); size_t normalize_text (char *text, size_t len, enum text_types buftype); struct vector *compile_string (struct vector *, char *str, size_t len); struct vector *compile_file (struct vector *, const char *cmdfile); diff --git a/sed/utils.h b/sed/utils.h index bf0981c..9387369 100644 --- a/sed/utils.h +++ b/sed/utils.h @@ -20,7 +20,7 @@ #include "basicdefs.h" -void panic (const char *str, ...); +_Noreturn void panic (const char *str, ...); FILE *ck_fopen (const char *name, const char *mode, int fail); FILE *ck_fdopen (int fd, const char *name, const char *mode, int fail); |