summaryrefslogtreecommitdiffstats
path: root/print.c
diff options
context:
space:
mode:
authorThomas Heijligen <thomas.heijligen@secunet.com>2022-08-08 21:55:07 +0200
committerThomas Heijligen <src@posteo.de>2022-09-13 19:06:47 +0000
commit74698d21653e4112f6afda48c4616ea7fea1dfc4 (patch)
tree2ab945555f092a3b6745af0838a13c6564482fb7 /print.c
parent3b8b93e17f6ad861acb2a0810ae1dcf03285fb10 (diff)
downloadflashrom-74698d21653e4112f6afda48c4616ea7fea1dfc4.tar.gz
flashrom-74698d21653e4112f6afda48c4616ea7fea1dfc4.tar.bz2
flashrom-74698d21653e4112f6afda48c4616ea7fea1dfc4.zip
print.c: Fix format string for Windows
dwMajorVersion and dwMinorVersion are DWORDS. Cast them to `unsigned long` to avoid a format error. TEST=Builds on Cygwin (Windows 10, amd64, gcc 11.3.0) Change-Id: I049220089f42e488fcc88e6738522f64171720eb Signed-off-by: Thomas Heijligen <thomas.heijligen@secunet.com> Reviewed-on: https://review.coreboot.org/c/flashrom/+/66547 Reviewed-by: Anastasia Klimchuk <aklm@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Singer <felixsinger@posteo.net>
Diffstat (limited to 'print.c')
-rw-r--r--print.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/print.c b/print.c
index 853ef0943..98d31094e 100644
--- a/print.c
+++ b/print.c
@@ -524,7 +524,8 @@ static void print_sysinfo(void)
/* Tell Windows which version of the structure we want. */
osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX);
if (GetVersionEx((OSVERSIONINFO*) &osvi))
- msg_ginfo(" %lu.%lu", osvi.dwMajorVersion, osvi.dwMinorVersion);
+ msg_ginfo(" %lu.%lu", (unsigned long)osvi.dwMajorVersion,
+ (unsigned long)osvi.dwMinorVersion);
else
msg_ginfo(" unknown version");
GetSystemInfo(&si);