summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2017-11-28 16:52:16 +0100
committerStephan Bergmann <sbergman@redhat.com>2017-11-28 16:52:16 +0100
commitc421ac3f9432f2e9468d28447dc4c2e45b6f4da3 (patch)
tree40a57a6ebae0c7d434811a803ea33b55419e9bfe
parentd6609c8b133c409bacfb3cff1e1d68c423e58f0a (diff)
Revert loplugin:unnecessaryparen warning around integer literals
...as those may be used to silence Clang -Werror,-Wunreachable-code (as happens in sal/osl/unx/file_volume.cxx for Android, where OSL_detail_STATFS(...) always expands to (1)). Change-Id: I85d280c1315b4447362255d17f13f437d3c4af92
-rw-r--r--compilerplugins/clang/unnecessaryparen.cxx6
-rw-r--r--sal/osl/unx/file_volume.cxx2
2 files changed, 4 insertions, 4 deletions
diff --git a/compilerplugins/clang/unnecessaryparen.cxx b/compilerplugins/clang/unnecessaryparen.cxx
index 046176a64150..903ce4e611ba 100644
--- a/compilerplugins/clang/unnecessaryparen.cxx
+++ b/compilerplugins/clang/unnecessaryparen.cxx
@@ -149,9 +149,9 @@ bool UnnecessaryParen::VisitParenExpr(const ParenExpr* parenExpr)
<< parenExpr->getSourceRange();
handled_.insert(parenExpr);
}
- } else if (isa<IntegerLiteral>(subExpr) || isa<CharacterLiteral>(subExpr)
- || isa<FloatingLiteral>(subExpr) || isa<ImaginaryLiteral>(subExpr)
- || isa<CXXNullPtrLiteralExpr>(subExpr))
+ } else if (isa<CharacterLiteral>(subExpr) || isa<FloatingLiteral>(subExpr)
+ || isa<ImaginaryLiteral>(subExpr) || isa<CXXNullPtrLiteralExpr>(subExpr))
+ //TODO: isa<IntegerLiteral>(subExpr)
//TODO: isa<CXXBoolLiteralExpr>(subExpr) || isa<ObjCBoolLiteralExpr>(subExpr)
{
auto const loc = subExpr->getLocStart();
diff --git a/sal/osl/unx/file_volume.cxx b/sal/osl/unx/file_volume.cxx
index 116874569b62..5dc41cc0f7ea 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(errno);
return result;