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 <joerg.bornemann@qt.io>
bb10
Friedemann Kleint 2017-06-09 15:44:00 +02:00 committed by Oliver Wolff
parent 25d9bd4bf4
commit ac7e8cc7f7
1 changed files with 2 additions and 1 deletions

View File

@ -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);
}
}