Thomas Heijligen submitted this change.

View Change


Approvals: build bot (Jenkins): Verified Felix Singer: Looks good to me, approved Anastasia Klimchuk: Looks good to me, approved
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>
---
M print.c
1 file changed, 21 insertions(+), 1 deletion(-)

diff --git a/print.c b/print.c
index 853ef09..98d3109 100644
--- a/print.c
+++ b/print.c
@@ -524,7 +524,8 @@
/* 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);

To view, visit change 66547. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I049220089f42e488fcc88e6738522f64171720eb
Gerrit-Change-Number: 66547
Gerrit-PatchSet: 7
Gerrit-Owner: Thomas Heijligen <src@posteo.de>
Gerrit-Reviewer: Anastasia Klimchuk <aklm@chromium.org>
Gerrit-Reviewer: Angel Pons <th3fanbus@gmail.com>
Gerrit-Reviewer: Felix Singer <felixsinger@posteo.net>
Gerrit-Reviewer: Nico Huber <nico.h@gmx.de>
Gerrit-Reviewer: Thomas Heijligen <src@posteo.de>
Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org>
Gerrit-MessageType: merged