]> granicus.if.org Git - shadow/commitdiff
* src/usermod.c: usage() does not return. Add annotations.
authornekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Thu, 14 Jul 2011 13:29:22 +0000 (13:29 +0000)
committernekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Thu, 14 Jul 2011 13:29:22 +0000 (13:29 +0000)
ChangeLog
src/usermod.c

index c3da1a82634f3aaa4a1261a97d1de092e6832ef0..aef33d8813c5ce3798853a446459265f88aaf7d8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -11,6 +11,7 @@
        requested.
        * src/usermod.c (process_flags): Check for oflg is not needed to
        check if changes are needed.
+       * src/usermod.c: usage() does not return. Add annotations.
 
 2011-07-08  Nicolas François  <nicolas.francois@centraliens.net>
 
index 684e00a6c46430fe7b5367ce9c3889c2c6dd49b8..34e279b2465f9cfa6a783b41612f50f3c5d2f789 100644 (file)
@@ -152,7 +152,7 @@ static bool sgr_locked = false;
 static void date_to_str (char *buf, size_t maxsize,
                          long int date, const char *negativ);
 static int get_groups (char *);
-static void usage (int status);
+static /*@noreturn@*/void usage (int status);
 static void new_pwent (struct passwd *);
 #ifdef WITH_SELINUX
 static void selinux_update_mapping (void);
@@ -303,7 +303,7 @@ static int get_groups (char *list)
 /*
  * usage - display usage message and exit
  */
-static void usage (int status)
+static /*@noreturn@*/void usage (int status)
 {
        fprintf ((E_SUCCESS != status) ? stderr : stdout,
                 _("Usage: usermod [options] LOGIN\n"
@@ -919,7 +919,7 @@ static void process_flags (int argc, char **argv)
                                break;
                        case 'h':
                                usage (E_SUCCESS);
-                               break;
+                               /* @notreached@ */break;
                        case 'l':
                                if (!is_valid_user_name (optarg)) {
                                        fprintf (stderr,