Fix integer narrowing on x86

The f_type is an alias to `int` on 32-bit system and the switch cases
uses `unsigned int`.

Closes #11427.
This commit is contained in:
Chocobo1 2019-10-31 12:59:54 +08:00
parent 6fd678195c
commit f31ee6a225
No known key found for this signature in database
GPG key ID: 210D9C873253A68C

View file

@ -348,7 +348,7 @@ bool Utils::Fs::isNetworkFileSystem(const QString &path)
// Magic number references:
// 1. /usr/include/linux/magic.h
// 2. https://github.com/coreutils/coreutils/blob/master/src/stat.c
switch (buf.f_type) {
switch (static_cast<unsigned int>(buf.f_type)) {
case 0xFF534D42: // CIFS_MAGIC_NUMBER
case 0x6969: // NFS_SUPER_MAGIC
case 0x517B: // SMB_SUPER_MAGIC