summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorChristophe Fergeau <cfergeau@redhat.com>2012-02-19 23:10:00 +0100
committerChristophe Fergeau <cfergeau@redhat.com>2012-02-23 19:03:25 +0100
commitdf3fe9cb90aaeb30f029428cf9030e2526768d08 (patch)
treea7250baaee9b274e28c9b1853dd7db232911a861 /common
parent8ca8687fcc29e4c70ec196c3e892b2d58ea704f0 (diff)
mingw: fix format string warnings
Most of them are caused by not using %lu to print a DWORD (which is an unsigned long).
Diffstat (limited to 'common')
-rw-r--r--common/vdlog.cpp2
-rw-r--r--common/vdlog.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/common/vdlog.cpp b/common/vdlog.cpp
index 8ece384..a0444d9 100644
--- a/common/vdlog.cpp
+++ b/common/vdlog.cpp
@@ -99,7 +99,7 @@ void log_version()
size < sizeof(VS_FIXEDFILEINFO)) {
throw;
}
- vd_printf("%d.%d.%d.%d",
+ vd_printf("%lu.%lu.%lu.%lu",
file_info->dwFileVersionMS >> 16,
file_info->dwFileVersionMS & 0x0ffff,
file_info->dwFileVersionLS >> 16,
diff --git a/common/vdlog.h b/common/vdlog.h
index 5a794b6..eebb0d2 100644
--- a/common/vdlog.h
+++ b/common/vdlog.h
@@ -54,7 +54,7 @@ static unsigned int log_level = LOG_INFO;
#endif
#define PRINT_LINE(type, format, datetime, ms, ...) \
- printf("%u::%s::%s,%.3d::%s::" format "\n", GetCurrentThreadId(), type, datetime, ms, \
+ printf("%lu::%s::%s,%.3d::%s::" format "\n", GetCurrentThreadId(), type, datetime, ms, \
__FUNCTION__, ## __VA_ARGS__);
#define LOG(type, format, ...) if (type >= log_level && type <= LOG_FATAL) { \