diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2022-11-08 18:23:21 -0800 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2022-11-14 16:54:08 -0800 |
commit | 7ae07138436c9700c65192c4fbc3015819999666 (patch) | |
tree | cfc9b94ba8b3e316c18e5a2d5d467b092d384b1e | |
parent | 55c9f8d4b5caf48c1d79252340e1750e160ded1e (diff) |
Mark help(), usage(), and grammar() with _X_NORETURN _X_COLD
Resolves gcc -Wsuggest-attribute=noreturn warning
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r-- | xprop.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -1845,12 +1845,14 @@ print_help (void) fprintf (stderr, "%s\n", help_message); } -void help (void) { +void _X_NORETURN _X_COLD +help (void) +{ print_help(); exit(0); } -void +void _X_NORETURN _X_COLD usage (const char *errmsg) { if (errmsg != NULL) @@ -1860,7 +1862,7 @@ usage (const char *errmsg) exit (1); } -static void +static void _X_NORETURN _X_COLD grammar (void) { printf ("Grammar for xprop:\n\n"); |