Skip to content

Commit

Permalink
Fix warning, based on patches by Zeev Tarantov and Jindrich Makovicka
Browse files Browse the repository at this point in the history
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5340 c046a42c-6fe2-441c-8c8c-71466251a162
  • Loading branch information
blueswir1 committed Sep 28, 2008
1 parent c9b1ae2 commit 7fd6d9f
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions block-vmdk.c
Original file line number Diff line number Diff line change
Expand Up @@ -710,13 +710,13 @@ static int vmdk_create(const char *filename, int64_t total_size,
"createType=\"monolithicSparse\"\n"
"\n"
"# Extent description\n"
"RW %lu SPARSE \"%s\"\n"
"RW %" PRId64 " SPARSE \"%s\"\n"
"\n"
"# The Disk Data Base \n"
"#DDB\n"
"\n"
"ddb.virtualHWVersion = \"%d\"\n"
"ddb.geometry.cylinders = \"%lu\"\n"
"ddb.geometry.cylinders = \"%" PRId64 "\"\n"
"ddb.geometry.heads = \"16\"\n"
"ddb.geometry.sectors = \"63\"\n"
"ddb.adapterType = \"ide\"\n";
Expand Down Expand Up @@ -792,8 +792,9 @@ static int vmdk_create(const char *filename, int64_t total_size,
if ((temp_str = strrchr(real_filename, ':')) != NULL)
real_filename = temp_str + 1;
snprintf(desc, sizeof(desc), desc_template, (unsigned int)time(NULL),
(unsigned long)total_size, real_filename,
(flags & BLOCK_FLAG_COMPAT6 ? 6 : 4), total_size / (63 * 16));
total_size, real_filename,
(flags & BLOCK_FLAG_COMPAT6 ? 6 : 4),
total_size / (int64_t)(63 * 16));

/* write the descriptor */
lseek(fd, le64_to_cpu(header.desc_offset) << 9, SEEK_SET);
Expand Down

0 comments on commit 7fd6d9f

Please sign in to comment.