]> wimlib.net Git - wimlib/commitdiff
Address MinGW compiler warnings (harmless)
authorEric Biggers <ebiggers3@gmail.com>
Sat, 6 Feb 2016 15:47:13 +0000 (09:47 -0600)
committerEric Biggers <ebiggers3@gmail.com>
Tue, 9 Feb 2016 01:44:33 +0000 (19:44 -0600)
programs/imagex.c
src/wimboot.c

index 48e7d31a0a20c573836a433dc50ceb7972c68165..4abcbac2a9e7ce353d92b56350c0754fbe8e10fa 100644 (file)
@@ -2628,6 +2628,7 @@ print_blobs(WIMStruct *wim)
        wimlib_iterate_lookup_table(wim, 0, print_resource, NULL);
 }
 
+#ifndef __WIN32__
 static void
 default_print_security_descriptor(const uint8_t *sd, size_t size)
 {
@@ -2635,6 +2636,7 @@ default_print_security_descriptor(const uint8_t *sd, size_t size)
        print_byte_field(sd, size);
        tputchar(T('\n'));
 }
+#endif
 
 static void
 print_dentry_detailed(const struct wimlib_dir_entry *dentry)
@@ -4571,16 +4573,17 @@ usage_all(FILE *fp)
        recommend_man_page(CMD_NONE, fp);
 }
 
+#ifdef __WIN32__
+extern int wmain(int argc, wchar_t **argv);
+#define main wmain
+#endif
+
 /* Entry point for wimlib's ImageX implementation.  On UNIX the command
  * arguments will just be 'char' strings (ideally UTF-8 encoded, but could be
  * something else), while on Windows the command arguments will be UTF-16LE
  * encoded 'wchar_t' strings. */
 int
-#ifdef __WIN32__
-wmain(int argc, wchar_t **argv, wchar_t **envp)
-#else
-main(int argc, char **argv)
-#endif
+main(int argc, tchar **argv)
 {
        int ret;
        int init_flags = 0;
index 467f9fb389c5dcd967cfb65e14bacae9e724d7e4..e8fecaf986a31e6a59260385e8aba97f3f8b62c1 100644 (file)
@@ -798,10 +798,10 @@ update_wimoverlay_manually(const wchar_t *drive, const wchar_t *wim_path,
        wchar_t path_backup[] = L"A:\\System Volume Information\\WimOverlay.backup";
        wchar_t path_wimlib_backup[] = L"A:\\System Volume Information\\WimOverlay.wimlib_backup";
        wchar_t path_new[] = L"A:\\System Volume Information\\WimOverlay.wimlib_new";
-       void *old_contents;
-       void *new_contents;
-       u32 new_contents_size;
-       u64 new_data_source_id;
+       void *old_contents = NULL;
+       void *new_contents = NULL;
+       u32 new_contents_size = 0;
+       u64 new_data_source_id = -1;
        int ret;
 
        wimlib_assert(drive[0] != L'\0' &&