From 2be8650d2cbf70f8773338beb682ef9ce6b094f1 Mon Sep 17 00:00:00 2001 From: nekral-guest Date: Sat, 23 Jul 2011 08:10:27 +0000 Subject: [PATCH] * src/lastlog.c: Add annotations to indicate that usage() does not return. --- ChangeLog | 5 +++++ src/lastlog.c | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8cae8a14..ee16134c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2011-07-23 Nicolas François + + * src/lastlog.c: Add annotations to indicate that usage() does not + return. + 2011-07-23 Nicolas François * src/faillog.c: Add annotations to indicate that usage() does not diff --git a/src/lastlog.c b/src/lastlog.c index 83e3a508..4a38631d 100644 --- a/src/lastlog.c +++ b/src/lastlog.c @@ -71,7 +71,7 @@ static bool bflg = false; /* print excludes most recent days */ #define NOW (time ((time_t *) 0)) -static void usage (int status) +static /*@noreturn@*/void usage (int status) { fputs (_("Usage: lastlog [options]\n" "\n" @@ -208,7 +208,7 @@ int main (int argc, char **argv) switch (c) { case 'h': usage (EXIT_SUCCESS); - break; + /*@notreached@*/break; case 't': { unsigned long days; @@ -267,7 +267,7 @@ int main (int argc, char **argv) } default: usage (EXIT_FAILURE); - break; + /*@notreached@*/break; } } if (argc > optind) { -- 2.40.0