]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Eliminate the warnings which Borland C Compiler complains "Unreachable code".
authorMichihiro NAKAJIMA <ggcueroad@gmail.com>
Sun, 20 Dec 2009 21:00:47 +0000 (16:00 -0500)
committerMichihiro NAKAJIMA <ggcueroad@gmail.com>
Sun, 20 Dec 2009 21:00:47 +0000 (16:00 -0500)
SVN-Revision: 1767

libarchive/archive_write_disk.c

index 7ce314934e72023f3f069888b71a5d4a55f79f5c..666c02066242e301931831a8a526a77f10e35635 100644 (file)
@@ -1152,22 +1152,22 @@ create_filesystem_object(struct archive_write_disk *a)
                 * S_IFCHR for the mknod() call.  This is correct.  */
                r = mknod(a->name, mode | S_IFCHR,
                    archive_entry_rdev(a->entry));
+               break;
 #else
                /* TODO: Find a better way to warn about our inability
                 * to restore a char device node. */
                return (EINVAL);
 #endif /* HAVE_MKNOD */
-               break;
        case AE_IFBLK:
 #ifdef HAVE_MKNOD
                r = mknod(a->name, mode | S_IFBLK,
                    archive_entry_rdev(a->entry));
+               break;
 #else
                /* TODO: Find a better way to warn about our inability
                 * to restore a block device node. */
                return (EINVAL);
 #endif /* HAVE_MKNOD */
-               break;
        case AE_IFDIR:
                mode = (mode | MINIMUM_DIR_MODE) & MAXIMUM_DIR_MODE;
                r = mkdir(a->name, mode);
@@ -1187,12 +1187,12 @@ create_filesystem_object(struct archive_write_disk *a)
        case AE_IFIFO:
 #ifdef HAVE_MKFIFO
                r = mkfifo(a->name, mode);
+               break;
 #else
                /* TODO: Find a better way to warn about our inability
                 * to restore a fifo. */
                return (EINVAL);
 #endif /* HAVE_MKFIFO */
-               break;
        }
 
        /* All the system calls above set errno on failure. */