Commit 7fd6d9fc876fd9a6863cd2300e703f52f8262413

Authored by blueswir1
1 parent c9b1ae2c

Fix warning, based on patches by Zeev Tarantov and Jindrich Makovicka

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5340 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 1 changed file with 5 additions and 4 deletions
block-vmdk.c
@@ -710,13 +710,13 @@ static int vmdk_create(const char *filename, int64_t total_size, @@ -710,13 +710,13 @@ static int vmdk_create(const char *filename, int64_t total_size,
710 "createType=\"monolithicSparse\"\n" 710 "createType=\"monolithicSparse\"\n"
711 "\n" 711 "\n"
712 "# Extent description\n" 712 "# Extent description\n"
713 - "RW %lu SPARSE \"%s\"\n" 713 + "RW %" PRId64 " SPARSE \"%s\"\n"
714 "\n" 714 "\n"
715 "# The Disk Data Base \n" 715 "# The Disk Data Base \n"
716 "#DDB\n" 716 "#DDB\n"
717 "\n" 717 "\n"
718 "ddb.virtualHWVersion = \"%d\"\n" 718 "ddb.virtualHWVersion = \"%d\"\n"
719 - "ddb.geometry.cylinders = \"%lu\"\n" 719 + "ddb.geometry.cylinders = \"%" PRId64 "\"\n"
720 "ddb.geometry.heads = \"16\"\n" 720 "ddb.geometry.heads = \"16\"\n"
721 "ddb.geometry.sectors = \"63\"\n" 721 "ddb.geometry.sectors = \"63\"\n"
722 "ddb.adapterType = \"ide\"\n"; 722 "ddb.adapterType = \"ide\"\n";
@@ -792,8 +792,9 @@ static int vmdk_create(const char *filename, int64_t total_size, @@ -792,8 +792,9 @@ static int vmdk_create(const char *filename, int64_t total_size,
792 if ((temp_str = strrchr(real_filename, ':')) != NULL) 792 if ((temp_str = strrchr(real_filename, ':')) != NULL)
793 real_filename = temp_str + 1; 793 real_filename = temp_str + 1;
794 snprintf(desc, sizeof(desc), desc_template, (unsigned int)time(NULL), 794 snprintf(desc, sizeof(desc), desc_template, (unsigned int)time(NULL),
795 - (unsigned long)total_size, real_filename,  
796 - (flags & BLOCK_FLAG_COMPAT6 ? 6 : 4), total_size / (63 * 16)); 795 + total_size, real_filename,
  796 + (flags & BLOCK_FLAG_COMPAT6 ? 6 : 4),
  797 + total_size / (int64_t)(63 * 16));
797 798
798 /* write the descriptor */ 799 /* write the descriptor */
799 lseek(fd, le64_to_cpu(header.desc_offset) << 9, SEEK_SET); 800 lseek(fd, le64_to_cpu(header.desc_offset) << 9, SEEK_SET);