summaryrefslogtreecommitdiff
path: root/ucb
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-10-15 15:58:56 +0200
committerStephan Bergmann <sbergman@redhat.com>2014-10-15 15:58:56 +0200
commitad9498f8b888f7851a8612b8d654a2bc89005925 (patch)
treeff7e98ce301121fdddf44f2fc8cb42bd2b1fac4f /ucb
parenteea16cb3e65a4308caddb7618d31a76ca259dbb1 (diff)
More -Werror,-Wunused-private-field
...detected with a modified trunk Clang with > Index: lib/Sema/SemaDeclCXX.cpp > =================================================================== > --- lib/Sema/SemaDeclCXX.cpp (revision 219190) > +++ lib/Sema/SemaDeclCXX.cpp (working copy) > @@ -1917,9 +1917,10 @@ > const Type *T = FD.getType()->getBaseElementTypeUnsafe(); > // FIXME: Destruction of ObjC lifetime types has side-effects. > if (const CXXRecordDecl *RD = T->getAsCXXRecordDecl()) > - return !RD->isCompleteDefinition() || > - !RD->hasTrivialDefaultConstructor() || > - !RD->hasTrivialDestructor(); > + return !RD->hasAttr<WarnUnusedAttr>() && > + (!RD->isCompleteDefinition() || > + !RD->hasTrivialDefaultConstructor() || > + !RD->hasTrivialDestructor()); > return false; > } > > @@ -3517,9 +3518,11 @@ > bool addFieldInitializer(CXXCtorInitializer *Init) { > AllToInit.push_back(Init); > > +#if 0 > // Check whether this initializer makes the field "used". > if (Init->getInit()->HasSideEffects(S.Context)) > S.UnusedPrivateFields.remove(Init->getAnyMember()); > +#endif > > return false; > } to warn about members of SAL_WARN_UNUSED-annotated class types, and warn about initializations with side effects (cf. <http://lists.cs.uiuc.edu/pipermail/cfe-dev/2014-October/039602.html> "-Wunused-private-field distracted by side effects"). Change-Id: I3f3181c4eb8180ca28e1fa3dffc9dbe1002c6628
Diffstat (limited to 'ucb')
-rw-r--r--ucb/source/ucp/ftp/ftpcontent.cxx3
-rw-r--r--ucb/source/ucp/ftp/ftpintreq.cxx3
-rw-r--r--ucb/source/ucp/ftp/ftpintreq.hxx4
-rw-r--r--ucb/source/ucp/ftp/ftpurl.cxx3
-rw-r--r--ucb/source/ucp/ftp/ftpurl.hxx2
5 files changed, 4 insertions, 11 deletions
diff --git a/ucb/source/ucp/ftp/ftpcontent.cxx b/ucb/source/ucp/ftp/ftpcontent.cxx
index 13c3fe2f9a11..d58ea9edf247 100644
--- a/ucb/source/ucp/ftp/ftpcontent.cxx
+++ b/ucb/source/ucp/ftp/ftpcontent.cxx
@@ -803,8 +803,7 @@ void FTPContent::insert(const InsertCommandArgument& aInsertCommand,
ucbhelper::cancelCommandExecution(aAny,Env);
}
- XInteractionRequestImpl* p =
- new XInteractionRequestImpl(m_aFTPURL.child());
+ XInteractionRequestImpl* p = new XInteractionRequestImpl;
Reference<XInteractionRequest> req(p);
xInt->handle(req);
if(p->approved()) {
diff --git a/ucb/source/ucp/ftp/ftpintreq.cxx b/ucb/source/ucp/ftp/ftpintreq.cxx
index 59bc54cec1c8..55f51d3aca26 100644
--- a/ucb/source/ucp/ftp/ftpintreq.cxx
+++ b/ucb/source/ucp/ftp/ftpintreq.cxx
@@ -62,10 +62,9 @@ void SAL_CALL XInteractionDisapproveImpl::select()
// XInteractionRequestImpl
-XInteractionRequestImpl::XInteractionRequestImpl(const OUString& aName)
+XInteractionRequestImpl::XInteractionRequestImpl()
: p1( new XInteractionApproveImpl )
, p2( new XInteractionDisapproveImpl )
- , m_aName(aName)
, m_aSeq( 2 )
{
m_aSeq[0] = Reference<XInteractionContinuation>(p1);
diff --git a/ucb/source/ucp/ftp/ftpintreq.hxx b/ucb/source/ucp/ftp/ftpintreq.hxx
index 51d117781ec9..80f976570ad6 100644
--- a/ucb/source/ucp/ftp/ftpintreq.hxx
+++ b/ucb/source/ucp/ftp/ftpintreq.hxx
@@ -76,7 +76,7 @@ namespace ftp {
{
public:
- XInteractionRequestImpl(const OUString& aName);
+ XInteractionRequestImpl();
com::sun::star::uno::Any SAL_CALL getRequest( )
throw (css::uno::RuntimeException,
@@ -94,8 +94,6 @@ namespace ftp {
XInteractionApproveImpl* p1;
XInteractionDisapproveImpl* p2;
- OUString m_aName;
-
css::uno::Sequence< css::uno::Reference< css::task::XInteractionContinuation > > m_aSeq;
};
diff --git a/ucb/source/ucp/ftp/ftpurl.cxx b/ucb/source/ucp/ftp/ftpurl.cxx
index 1fb36be4a2ae..7a2224da2be9 100644
--- a/ucb/source/ucp/ftp/ftpurl.cxx
+++ b/ucb/source/ucp/ftp/ftpurl.cxx
@@ -114,8 +114,7 @@ extern "C" {
FTPURL::FTPURL(const FTPURL& r)
- : m_mutex(),
- m_pFCP(r.m_pFCP),
+ : m_pFCP(r.m_pFCP),
m_aUsername(r.m_aUsername),
m_bShowPassword(r.m_bShowPassword),
m_aHost(r.m_aHost),
diff --git a/ucb/source/ucp/ftp/ftpurl.hxx b/ucb/source/ucp/ftp/ftpurl.hxx
index 3b83f6d692e6..496c1768a2c7 100644
--- a/ucb/source/ucp/ftp/ftpurl.hxx
+++ b/ucb/source/ucp/ftp/ftpurl.hxx
@@ -142,8 +142,6 @@ namespace ftp {
private:
- osl::Mutex m_mutex;
-
FTPHandleProvider *m_pFCP;
mutable OUString m_aUsername;