From 08cedb953b347cee395fcc8b507fc45087de45c6 Mon Sep 17 00:00:00 2001 From: Darshit Shah Date: Mon, 16 Jun 2014 18:25:44 +0530 Subject: Mark non returning functions --- src/ChangeLog | 5 +++++ src/main.c | 4 ++-- src/utils.c | 4 ++-- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 07d7f385..189a503c 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2014-06-16 Darshit Shah + + * main.c (print_help, print_version): Mark as noreturn. + * utils.c (memfatal, abort_run_with_timout): Same + 2014-06-11 Giuseppe Scrivano * ftp.c: Replace main() with main in comments. diff --git a/src/main.c b/src/main.c index 8db80e49..70930ddf 100644 --- a/src/main.c +++ b/src/main.c @@ -416,7 +416,7 @@ print_usage (int error) /* Print the help message, describing all the available options. If you add an option, be sure to update this list. */ -static void +static void _Noreturn print_help (void) { /* We split the help text this way to ease translation of individual @@ -879,7 +879,7 @@ format_and_print_line (const char *prefix, const char *line, return 0; } -static void +static void _Noreturn print_version (void) { const char *wgetrc_title = _("Wgetrc: "); diff --git a/src/utils.c b/src/utils.c index 0be07701..78c282ee 100644 --- a/src/utils.c +++ b/src/utils.c @@ -100,7 +100,7 @@ as that of the covered work. */ #include "exits.h" -static void +static void _Noreturn memfatal (const char *context, long attempted_size) { /* Make sure we don't try to store part of the log line, and thus @@ -1896,7 +1896,7 @@ random_float (void) static sigjmp_buf run_with_timeout_env; -static void +static void _Noreturn abort_run_with_timeout (int sig) { assert (sig == SIGALRM); -- cgit v1.2.1