From 91dbc59020cff5ab37fa5819e7e3b6055a71a570 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCri=20Valdmann?= Date: Wed, 20 Sep 2017 13:29:53 +0200 Subject: [PATCH] Fix unused variable warning in qrandom.cpp The 'ret' variable is unused if assertions are disabled. Change-Id: I90fec4e18e82d13b681068e222e994247988cbc5 Reviewed-by: Thiago Macieira --- src/corelib/global/qrandom.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/corelib/global/qrandom.cpp b/src/corelib/global/qrandom.cpp index 2247394363..22d23ae6fa 100644 --- a/src/corelib/global/qrandom.cpp +++ b/src/corelib/global/qrandom.cpp @@ -139,11 +139,13 @@ public: // getentropy can't fail under normal circumstances int ret = getentropy(reinterpret_cast(buffer) + read, 256); Q_ASSERT(ret == 0); + Q_UNUSED(ret); read += 256; } int ret = getentropy(reinterpret_cast(buffer) + read, count - read); Q_ASSERT(ret == 0); + Q_UNUSED(ret); return count; } };