[Libreoffice-commits] core.git: sal/osl
Stephan Bergmann
sbergman at redhat.com
Wed Sep 13 09:17:57 UTC 2017
sal/osl/unx/file_volume.cxx | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
New commits:
commit 9088ef89b792cbb9eeb06137c391b7cab5042330
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Wed Sep 13 11:17:26 2017 +0200
Silence -Werror,-Wunreachable-code on Android
Change-Id: Ide7591b4012f23e8a3faa705537937efcac435a2
diff --git a/sal/osl/unx/file_volume.cxx b/sal/osl/unx/file_volume.cxx
index 6db0beba2a39..3388019bd8d2 100644
--- a/sal/osl/unx/file_volume.cxx
+++ b/sal/osl/unx/file_volume.cxx
@@ -216,7 +216,7 @@ static oslFileError osl_psz_getVolumeInformation (
{
OSL_detail_STATFS_STRUCT sfs;
OSL_detail_STATFS_INIT(sfs);
- if ((OSL_detail_STATFS(pszDirectory, &sfs)) < 0)
+ if ((OSL_detail_STATFS(pszDirectory, &sfs)) < (0))
{
oslFileError result = oslTranslateFileError(OSL_FET_ERROR, errno);
return result;
@@ -225,7 +225,9 @@ static oslFileError osl_psz_getVolumeInformation (
/* FIXME: how to detect the kind of storage (fixed, cdrom, ...) */
if (uFieldMask & osl_VolumeInfo_Mask_Attributes)
{
- if (OSL_detail_STATFS_ISREMOTE(sfs))
+ bool const remote = OSL_detail_STATFS_ISREMOTE(sfs);
+ // extracted from the 'if' to avoid Clang -Wunreachable-code
+ if (remote)
pInfo->uAttributes |= osl_Volume_Attribute_Remote;
pInfo->uValidFields |= osl_VolumeInfo_Mask_Attributes;
More information about the Libreoffice-commits
mailing list