From 462295d9f84658aa7b43401fe7d1373cb3b0fc2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Wed, 17 Jul 2013 20:41:04 +0200 Subject: [PATCH] Fix invalid print format for uint64_t values format '%lu' expects argument of type 'long unsigned int', but argument 9 has type 'uint64_t --- vdagent/file_xfer.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/vdagent/file_xfer.cpp b/vdagent/file_xfer.cpp index b7a480c..6ba15a3 100644 --- a/vdagent/file_xfer.cpp +++ b/vdagent/file_xfer.cpp @@ -16,6 +16,10 @@ */ #include +#define __STDC_FORMAT_MACROS +#define __USE_MINGW_ANSI_STDIO 1 +#include +#include #include "file_xfer.h" FileXfer::~FileXfer() @@ -48,7 +52,7 @@ void FileXfer::handle_start(VDAgentFileXferStartMessage* start, vd_printf("file id %u meta parsing failed", start->id); return; } - vd_printf("%u %s (%llu)", start->id, file_name, file_size); + vd_printf("%u %s (%" PRIu64 ")", start->id, file_name, file_size); if (FAILED(SHGetFolderPathA(NULL, CSIDL_COMMON_DESKTOPDIRECTORY | CSIDL_FLAG_CREATE, NULL, SHGFP_TYPE_CURRENT, file_path))) { vd_printf("failed getting desktop path"); @@ -59,7 +63,7 @@ void FileXfer::handle_start(VDAgentFileXferStartMessage* start, return; } if (free_bytes.QuadPart < file_size) { - vd_printf("insufficient disk space %llu", free_bytes.QuadPart); + vd_printf("insufficient disk space %" PRIu64, free_bytes.QuadPart); return; } strcat_s(file_path, MAX_PATH, "\\");