summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarshit Shah <darnir@gmail.com>2014-06-16 18:25:44 +0530
committerDarshit Shah <darnir@gmail.com>2014-06-16 18:25:44 +0530
commit08cedb953b347cee395fcc8b507fc45087de45c6 (patch)
treee0d4f7286283aea5db721182248849b9e645c3db
parentc03855be4071e15c10fcb2b568c8807a45b0eb80 (diff)
downloadwget-08cedb953b347cee395fcc8b507fc45087de45c6.tar.gz
Mark non returning functions
-rw-r--r--src/ChangeLog5
-rw-r--r--src/main.c4
-rw-r--r--src/utils.c4
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 <darnir@gmail.com>
+
+ * main.c (print_help, print_version): Mark as noreturn.
+ * utils.c (memfatal, abort_run_with_timout): Same
+
2014-06-11 Giuseppe Scrivano <gscrivan@redhat.com>
* 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);