Skip to content

Commit

Permalink
block/raw-win32: Fix compiler warnings (wrong format specifiers)
Browse files Browse the repository at this point in the history
Commit fbcad04 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>
  • Loading branch information
stweil authored and stefanhaRH committed Jan 2, 2013
1 parent 7944339 commit fccedc6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions block/raw-win32.c
Expand Up @@ -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;
Expand Down

0 comments on commit fccedc6

Please sign in to comment.