From df3fe9cb90aaeb30f029428cf9030e2526768d08 Mon Sep 17 00:00:00 2001 From: Christophe Fergeau Date: Sun, 19 Feb 2012 23:10:00 +0100 Subject: mingw: fix format string warnings Most of them are caused by not using %lu to print a DWORD (which is an unsigned long). --- common/vdlog.cpp | 2 +- common/vdlog.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'common') 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) { \ -- cgit v1.2.3