File 0001-Fix-error-narrowing-conversion-.-from-unsigned-int-t.patch of Package kdelibs4
From f1d5330472b55f830f56d41f6d558e3c58056c4a Mon Sep 17 00:00:00 2001
From: Ralf Habacker <ralf.habacker@freenet.de>
Date: Wed, 3 Jun 2020 15:06:56 +0200
Subject: [PATCH] Fix error: narrowing conversion ... from 'unsigned int' to
'int' [-Wnarrowing]
---
dnssd/servicemodel.cpp | 2 +-
kdecore/io/kfilesystemtype_p.cpp | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/dnssd/servicemodel.cpp b/dnssd/servicemodel.cpp
index 38f0e5dfaa..f603722491 100644
--- a/dnssd/servicemodel.cpp
+++ b/dnssd/servicemodel.cpp
@@ -80,7 +80,7 @@ QVariant ServiceModel::data(const QModelIndex& index, int role ) const
if (!index.isValid()) return QVariant();
if (!hasIndex(index.row(), index.column(), index.parent())) return QVariant();
const QList<RemoteService::Ptr> srv=d->m_browser->services();
- switch (role) {
+ switch ((unsigned int)role) {
case Qt::DisplayRole:
switch (index.column()) {
case ServiceName: return srv[index.row()]->serviceName();
diff --git a/kdecore/io/kfilesystemtype_p.cpp b/kdecore/io/kfilesystemtype_p.cpp
index 158f51db29..9fee36f156 100644
--- a/kdecore/io/kfilesystemtype_p.cpp
+++ b/kdecore/io/kfilesystemtype_p.cpp
@@ -94,7 +94,7 @@ KFileSystemType::Type determineFileSystemTypeImpl(const QByteArray& path)
//kDebug() << path << errno << strerror(errno);
return KFileSystemType::Unknown;
}
- switch (buf.f_type) {
+ switch ((unsigned int)buf.f_type) {
case NFS_SUPER_MAGIC:
case AUTOFS_SUPER_MAGIC:
case AUTOFSNG_SUPER_MAGIC:
--
2.26.1