summaryrefslogtreecommitdiff
path: root/vdagent
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@gmail.com>2013-07-17 20:41:04 +0200
committerMarc-André Lureau <marcandre.lureau@gmail.com>2013-07-17 20:45:21 +0200
commit462295d9f84658aa7b43401fe7d1373cb3b0fc2d (patch)
treedf7bebdf21e04ef7cd6740f9a886d14b6e7a8009 /vdagent
parentb52c9ddfa862ecd7f774946ed12185384c85a533 (diff)
Fix invalid print format for uint64_t values
format '%lu' expects argument of type 'long unsigned int', but argument 9 has type 'uint64_t
Diffstat (limited to 'vdagent')
-rw-r--r--vdagent/file_xfer.cpp8
1 files 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 <shlobj.h>
+#define __STDC_FORMAT_MACROS
+#define __USE_MINGW_ANSI_STDIO 1
+#include <inttypes.h>
+#include <stdio.h>
#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, "\\");