Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sbin/mount_cd9660 mount_cd9660: remove unhandled option -i f...



details:   https://anonhg.NetBSD.org/src/rev/8febc4c9a728
branches:  trunk
changeset: 371906:8febc4c9a728
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sun Oct 16 16:26:35 2022 +0000

description:
mount_cd9660: remove unhandled option -i from getopt

Found by lint. While here, fix the other lint warning as well, as lint
still doesn't know that exit(3) doesn't return normally.

diffstat:

 sbin/mount_cd9660/mount_cd9660.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (35 lines):

diff -r 8bf4e9430c68 -r 8febc4c9a728 sbin/mount_cd9660/mount_cd9660.c
--- a/sbin/mount_cd9660/mount_cd9660.c  Sun Oct 16 15:20:59 2022 +0000
+++ b/sbin/mount_cd9660/mount_cd9660.c  Sun Oct 16 16:26:35 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mount_cd9660.c,v 1.32 2011/08/29 14:35:00 joerg Exp $  */
+/*     $NetBSD: mount_cd9660.c,v 1.33 2022/10/16 16:26:35 rillig Exp $ */
 
 /*
  * Copyright (c) 1992, 1993, 1994
@@ -46,7 +46,7 @@
 #if 0
 static char sccsid[] = "@(#)mount_cd9660.c     8.7 (Berkeley) 5/1/95";
 #else
-__RCSID("$NetBSD: mount_cd9660.c,v 1.32 2011/08/29 14:35:00 joerg Exp $");
+__RCSID("$NetBSD: mount_cd9660.c,v 1.33 2022/10/16 16:26:35 rillig Exp $");
 #endif
 #endif /* not lint */
 
@@ -106,7 +106,7 @@
        memset(args, 0, sizeof(*args));
        *mntflags = opts = 0;
        optind = optreset = 1;
-       while ((ch = getopt(argc, argv, "egijo:r")) != -1)
+       while ((ch = getopt(argc, argv, "egjo:r")) != -1)
                switch (ch) {
                case 'e':
                        /* obsolete, retained for compatibility only, use
@@ -180,6 +180,7 @@
        }
 
        exit(0);
+       /* NOTREACHED */
 }
 
 static void



Home | Main Index | Thread Index | Old Index