From 98d12e72f5a8c3a02c9abe0ba91b4441dd95ff2b Mon Sep 17 00:00:00 2001 From: Jeremy Lainé Date: Fri, 13 Mar 2015 00:27:10 +0100 Subject: fix pedantic GCC error about char overflow --- tests/qxmpputils/tst_qxmpputils.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/qxmpputils/tst_qxmpputils.cpp') diff --git a/tests/qxmpputils/tst_qxmpputils.cpp b/tests/qxmpputils/tst_qxmpputils.cpp index 7e494211..ea1dd5d2 100644 --- a/tests/qxmpputils/tst_qxmpputils.cpp +++ b/tests/qxmpputils/tst_qxmpputils.cpp @@ -50,13 +50,13 @@ void tst_QXmppUtils::testCrc32() void tst_QXmppUtils::testHmac() { - QByteArray hmac = QXmppUtils::generateHmacMd5(QByteArray(16, 0x0b), QByteArray("Hi There")); + QByteArray hmac = QXmppUtils::generateHmacMd5(QByteArray(16, '\x0b'), QByteArray("Hi There")); QCOMPARE(hmac, QByteArray::fromHex("9294727a3638bb1c13f48ef8158bfc9d")); hmac = QXmppUtils::generateHmacMd5(QByteArray("Jefe"), QByteArray("what do ya want for nothing?")); QCOMPARE(hmac, QByteArray::fromHex("750c783e6ab0b503eaa86e310a5db738")); - hmac = QXmppUtils::generateHmacMd5(QByteArray(16, 0xaa), QByteArray(50, 0xdd)); + hmac = QXmppUtils::generateHmacMd5(QByteArray(16, '\xaa'), QByteArray(50, '\xdd')); QCOMPARE(hmac, QByteArray::fromHex("56be34521d144c88dbb8c733f0e8b3f6")); } -- cgit v1.2.3