From ac7e8cc7f74b511c2ce6577d7d2b6c648b78a87d Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Fri, 9 Jun 2017 15:44:00 +0200 Subject: Direct2D: Fix build with MinGW 7.1 qwindowsdirect2ddevicecontext.cpp:92:105: error: format '%x' expects argument of type 'unsigned int', but argument 4 has type 'HRESULT {aka long int}' [-Werror=format=] qWarning("%s: EndDraw failed: %#x, tag1: %lld, tag2: %lld", __FUNCTION__, hr, tag1, tag2); Change format to long and cast argument to long for extra safety (should some obscure MinGW header define another type). Change-Id: I7e6cb8ea1e5c27ef104b162ced9a696ab252fd8d Reviewed-by: Joerg Bornemann --- src/plugins/platforms/direct2d/qwindowsdirect2ddevicecontext.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/plugins/platforms') diff --git a/src/plugins/platforms/direct2d/qwindowsdirect2ddevicecontext.cpp b/src/plugins/platforms/direct2d/qwindowsdirect2ddevicecontext.cpp index 8a34f6974f..643ae877d0 100644 --- a/src/plugins/platforms/direct2d/qwindowsdirect2ddevicecontext.cpp +++ b/src/plugins/platforms/direct2d/qwindowsdirect2ddevicecontext.cpp @@ -89,7 +89,8 @@ public: if (FAILED(hr)) { success = false; - qWarning("%s: EndDraw failed: %#x, tag1: %lld, tag2: %lld", __FUNCTION__, hr, tag1, tag2); + qWarning("%s: EndDraw failed: %#lx, tag1: %lld, tag2: %lld", + __FUNCTION__, long(hr), tag1, tag2); } } -- cgit v1.2.3