From 333f3ade0d0f2e011e26cba766b4801efaac8a00 Mon Sep 17 00:00:00 2001 From: "Aaron M. Ucko" Date: Sun, 6 Sep 2020 22:57:35 -0400 Subject: [PATCH] Support GCC 10+. Debian-Bug: 957581. * ncbifile.cpp (s_GetFileSystemInfo): Formally cast st.f_type to avoid narrowing errors for cases with the high bit set when that field is a 32-bit signed integer (as on i386). Gbp-Pq: Name support_gcc10 --- c++/src/corelib/ncbifile.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/c++/src/corelib/ncbifile.cpp b/c++/src/corelib/ncbifile.cpp index 8736c5a3..4808ea94 100644 --- a/c++/src/corelib/ncbifile.cpp +++ b/c++/src/corelib/ncbifile.cpp @@ -5178,7 +5178,7 @@ void s_GetFileSystemInfo(const string& path, GET_STATFS_INFO; if (flags & (fFSI_Type | fFSI_DiskSpace)) { - switch (st.f_type) { + switch (static_cast(st.f_type)) { case 0xADF5: info->fs_type = CFileUtil::eADFS; break; case 0xADFF: info->fs_type = CFileUtil::eAFFS; break; case 0x5346414F: info->fs_type = CFileUtil::eAFS; break; -- 2.30.2