diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-10-15 15:58:56 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-10-15 15:58:56 +0200 |
commit | ad9498f8b888f7851a8612b8d654a2bc89005925 (patch) | |
tree | ff7e98ce301121fdddf44f2fc8cb42bd2b1fac4f /filter/source/xsltdialog | |
parent | Resolves: #i63015# always default to WinAnsiEncoding... (diff) | |
download | core-ad9498f8b888f7851a8612b8d654a2bc89005925.tar.gz core-ad9498f8b888f7851a8612b8d654a2bc89005925.zip |
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 'filter/source/xsltdialog')
-rw-r--r-- | filter/source/xsltdialog/typedetectionimport.cxx | 4 | ||||
-rw-r--r-- | filter/source/xsltdialog/typedetectionimport.hxx | 4 | ||||
-rw-r--r-- | filter/source/xsltdialog/xmlfilterjar.cxx | 1 | ||||
-rw-r--r-- | filter/source/xsltdialog/xmlfilterjar.hxx | 1 | ||||
-rw-r--r-- | filter/source/xsltdialog/xmlfiltertabpagexslt.cxx | 4 | ||||
-rw-r--r-- | filter/source/xsltdialog/xmlfiltertabpagexslt.hxx | 4 |
6 files changed, 1 insertions, 17 deletions
diff --git a/filter/source/xsltdialog/typedetectionimport.cxx b/filter/source/xsltdialog/typedetectionimport.cxx index 89c0761a59d8..781641e0a03a 100644 --- a/filter/source/xsltdialog/typedetectionimport.cxx +++ b/filter/source/xsltdialog/typedetectionimport.cxx @@ -46,9 +46,7 @@ TypeDetectionImporter::TypeDetectionImporter() sFilters( "Filters" ), sTypes( "Types" ), sFilterAdaptorService( "com.sun.star.comp.Writer.XmlFilterAdaptor" ), - sXSLTFilterService( "com.sun.star.documentconversion.XSLTFilter" ), - sCdataAttribute( "CDATA" ), - sWhiteSpace( " " ) + sXSLTFilterService( "com.sun.star.documentconversion.XSLTFilter" ) { } diff --git a/filter/source/xsltdialog/typedetectionimport.hxx b/filter/source/xsltdialog/typedetectionimport.hxx index 685a0a5d8d8d..a755dbc26f6a 100644 --- a/filter/source/xsltdialog/typedetectionimport.hxx +++ b/filter/source/xsltdialog/typedetectionimport.hxx @@ -109,10 +109,6 @@ private: const OUString sTypes; const OUString sFilterAdaptorService; const OUString sXSLTFilterService; - - const OUString sCdataAttribute; - const OUString sWhiteSpace; - }; #endif diff --git a/filter/source/xsltdialog/xmlfilterjar.cxx b/filter/source/xsltdialog/xmlfilterjar.cxx index 1b56bbdbc9b4..a5956ceefc41 100644 --- a/filter/source/xsltdialog/xmlfilterjar.cxx +++ b/filter/source/xsltdialog/xmlfilterjar.cxx @@ -66,7 +66,6 @@ XMLFilterJarHelper::XMLFilterJarHelper( const Reference< XComponentContext >& rx sVndSunStarPackage( "vnd.sun.star.Package:" ), sXSLTPath( "$(user)/xslt/" ), sTemplatePath( "$(user)/template/" ), - sPump( "com.sun.star.io.Pump" ), sProgPath( "$(prog)/" ) { SvtPathOptions aOptions; diff --git a/filter/source/xsltdialog/xmlfilterjar.hxx b/filter/source/xsltdialog/xmlfilterjar.hxx index 689e7470024e..49731b8a2ae1 100644 --- a/filter/source/xsltdialog/xmlfilterjar.hxx +++ b/filter/source/xsltdialog/xmlfilterjar.hxx @@ -48,7 +48,6 @@ private: OUString sVndSunStarPackage; OUString sXSLTPath; OUString sTemplatePath; - OUString sPump; OUString sProgPath; }; diff --git a/filter/source/xsltdialog/xmlfiltertabpagexslt.cxx b/filter/source/xsltdialog/xmlfiltertabpagexslt.cxx index 1edc50fb25a7..d8086212c7aa 100644 --- a/filter/source/xsltdialog/xmlfiltertabpagexslt.cxx +++ b/filter/source/xsltdialog/xmlfiltertabpagexslt.cxx @@ -37,10 +37,6 @@ using namespace ::com::sun::star::lang; XMLFilterTabPageXSLT::XMLFilterTabPageXSLT( vcl::Window* pParent) : TabPage( pParent, "XmlFilterTabPageTransformation", "filter/ui/xmlfiltertabpagetransformation.ui" ), - sHTTPSchema( "http://" ), - sSHTTPSchema( "https://" ), - sFILESchema( "file://" ), - sFTPSchema( "ftp://" ), sInstPath( "$(prog)/" ) { get(m_pEDDocType,"doc"); diff --git a/filter/source/xsltdialog/xmlfiltertabpagexslt.hxx b/filter/source/xsltdialog/xmlfiltertabpagexslt.hxx index 5f09a33c067f..01f36d518a7e 100644 --- a/filter/source/xsltdialog/xmlfiltertabpagexslt.hxx +++ b/filter/source/xsltdialog/xmlfiltertabpagexslt.hxx @@ -59,10 +59,6 @@ private: void SetURL( SvtURLBox *rURLBox, const OUString& rURL ); OUString GetURL( SvtURLBox* rURLBox ); - OUString sHTTPSchema; - OUString sSHTTPSchema; - OUString sFILESchema; - OUString sFTPSchema; OUString sInstPath; }; |