]> granicus.if.org Git - shadow/commitdiff
* src/lastlog.c: Add annotations to indicate that usage() does not
authornekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Sat, 23 Jul 2011 08:10:27 +0000 (08:10 +0000)
committernekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Sat, 23 Jul 2011 08:10:27 +0000 (08:10 +0000)
return.

ChangeLog
src/lastlog.c

index 8cae8a14e9ff48df3928d0ce047bbfda7e8f0a2d..ee16134c30a480b6bb4ee556fdf3c2d9b00f9da2 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2011-07-23  Nicolas François  <nicolas.francois@centraliens.net>
+
+       * src/lastlog.c: Add annotations to indicate that usage() does not
+       return.
+
 2011-07-23  Nicolas François  <nicolas.francois@centraliens.net>
 
        * src/faillog.c: Add annotations to indicate that usage() does not
index 83e3a5085f5b88a729708fa65254ceb5164d4785..4a38631dc9d8416596a04a393fbd4ef9c2c7d813 100644 (file)
@@ -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) {