summaryrefslogtreecommitdiff
path: root/sal
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2017-09-13 11:17:26 +0200
committerStephan Bergmann <sbergman@redhat.com>2017-09-13 11:17:26 +0200
commit9088ef89b792cbb9eeb06137c391b7cab5042330 (patch)
tree777e04717075cdcbad5ba8394c952d697210cb5e /sal
parent403c7729734ed1a545f0436e31c4d14a2724606d (diff)
Silence -Werror,-Wunreachable-code on Android
Change-Id: Ide7591b4012f23e8a3faa705537937efcac435a2
Diffstat (limited to 'sal')
-rw-r--r--sal/osl/unx/file_volume.cxx6
1 files changed, 4 insertions, 2 deletions
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;