]> wimlib.net Git - wimlib/blobdiff - src/mount_image.c
update_lte_of_staging_file(): Use BUILD_BUG_ON
[wimlib] / src / mount_image.c
index bd1a7d54bc5aee6660905ef3be4fa24407380ecf..af39246128e2fdffa04fe256c49bb6f507abbd03 100644 (file)
@@ -758,7 +758,7 @@ static int update_lte_of_staging_file(struct wim_lookup_table_entry *lte,
                        inode_update_lte_ptr(lte->lte_inode, lte, NULL);
                        free_lookup_table_entry(lte);
                } else {
-                       wimlib_assert(&lte->file_on_disk == &lte->staging_file_name);
+                       BUILD_BUG_ON(&lte->file_on_disk != &lte->staging_file_name);
                        lte->resource_entry.original_size = stbuf.st_size;
                        lte->resource_entry.size = stbuf.st_size;
                        lte->resource_location = RESOURCE_IN_FILE_ON_DISK;
@@ -2325,7 +2325,7 @@ WIMLIBAPI int wimlib_mount_image(WIMStruct *wim, int image, const char *dir,
                                 unsigned num_additional_swms,
                                 const char *staging_dir)
 {
-       int argc = 0;
+       int argc;
        char *argv[16];
        int ret;
        char *dir_copy;
@@ -2425,6 +2425,7 @@ WIMLIBAPI int wimlib_mount_image(WIMStruct *wim, int image, const char *dir,
        if (!dir_copy)
                goto out_free_message_queue_names;
 
+       argc = 0;
        argv[argc++] = "imagex";
        argv[argc++] = dir_copy;