aboutsummaryrefslogtreecommitdiff
path: root/block/raw-win32.c
diff options
context:
space:
mode:
authorStefan Weil <sw@weilnetz.de>2012-12-17 20:40:01 +0100
committerStefan Hajnoczi <stefanha@redhat.com>2013-01-02 16:08:57 +0100
commitfccedc624c425e3acb1557f9f9b13104427ec5ce (patch)
tree64a53ed0d6b68e0ef54abaed493a8cb91ce55b44 /block/raw-win32.c
parent7944339726b4582b67fd94085c21c33636e8f973 (diff)
downloadqemu-fccedc624c425e3acb1557f9f9b13104427ec5ce.zip
qemu-fccedc624c425e3acb1557f9f9b13104427ec5ce.tar.gz
qemu-fccedc624c425e3acb1557f9f9b13104427ec5ce.tar.bz2
block/raw-win32: Fix compiler warnings (wrong format specifiers)
Commit fbcad04d6bfdff937536eb23088a01a280a1a3af added fprintf statements with wrong format specifiers. GetLastError() returns a DWORD which is unsigned long, so %lu must be used. Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'block/raw-win32.c')
-rw-r--r--block/raw-win32.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/block/raw-win32.c b/block/raw-win32.c
index f58334b..b89ac19 100644
--- a/block/raw-win32.c
+++ b/block/raw-win32.c
@@ -314,11 +314,11 @@ static int raw_truncate(BlockDriverState *bs, int64_t offset)
*/
dwPtrLow = SetFilePointer(s->hfile, low, &high, FILE_BEGIN);
if (dwPtrLow == INVALID_SET_FILE_POINTER && GetLastError() != NO_ERROR) {
- fprintf(stderr, "SetFilePointer error: %d\n", GetLastError());
+ fprintf(stderr, "SetFilePointer error: %lu\n", GetLastError());
return -EIO;
}
if (SetEndOfFile(s->hfile) == 0) {
- fprintf(stderr, "SetEndOfFile error: %d\n", GetLastError());
+ fprintf(stderr, "SetEndOfFile error: %lu\n", GetLastError());
return -EIO;
}
return 0;