From 6760397f6c242420612f57fcad357f3f4327cede Mon Sep 17 00:00:00 2001 From: Nicolas Werner Date: Sat, 4 Dec 2021 02:42:58 +0100 Subject: [PATCH] Fix sanitizer warning about signed shifts --- src/Utils.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Utils.cpp b/src/Utils.cpp index 3a785ddb..27f0c42f 100644 --- a/src/Utils.cpp +++ b/src/Utils.cpp @@ -644,7 +644,8 @@ utils::hashQString(const QString &input) { auto h = QCryptographicHash::hash(input.toUtf8(), QCryptographicHash::Sha1); - return (h[0] << 24) ^ (h[1] << 16) ^ (h[2] << 8) ^ h[3]; + return (static_cast(h[0]) << 24) ^ (static_cast(h[1]) << 16) ^ + (static_cast(h[2]) << 8) ^ static_cast(h[3]); } QColor