This is an automated email from the ASF dual-hosted git repository.

truckman pushed a commit to branch AOO41X
in repository https://gitbox.apache.org/repos/asf/openoffice.git


The following commit(s) were added to refs/heads/AOO41X by this push:
     new 6c070d845b Fix build with FreeBSD clang version 19.1.2
6c070d845b is described below

commit 6c070d845b47f9eb0fb037ebca08762d8c2052b6
Author: Don Lewis <truck...@apache.org>
AuthorDate: Thu Nov 7 21:13:04 2024 -0800

    Fix build with FreeBSD clang version 19.1.2
    
    Fix this build error:
    
    In file included from 
/wrkdirs/usr/ports/editors/openoffice-4/work/aoo-4.1.15/main/writerfilter/source/ooxml/OOXMLFactory.cxx:28:
    In file included from 
/wrkdirs/usr/ports/editors/openoffice-4/work/aoo-4.1.15/main/writerfilter/source/ooxml/OOXMLFactory.hxx:39:
    In file included from 
.../main/writerfilter/source/ooxml/OOXMLFastContextHandler.hxx:38:
    .../main/writerfilter/source/ooxml/RefAndPointer.hxx:104:18: error: no 
member named 'getHandler' in 'RefAndPointer<Interface, ChildClass>'; did you 
mean 'mpHandler'?
      104 |         set(rSrc.getHandler());
          |                  ^~~~~~~~~~
          |                  mpHandler
    .../main/writerfilter/source/ooxml/RefAndPointer.hxx:39:26: note: 
'mpHandler' declared here
       39 |     mutable ChildClass * mpHandler;
    .../main/writerfilter/source/ooxml/RefAndPointer.hxx:39:26: note: 
'mpHandler' declared here
       39 |     mutable ChildClass * mpHandler;
          |
    
    when building with:
    
    FreeBSD clang version 19.1.2 (https://github.com/llvm/llvm-project.git 
llvmorg-19.1.2-0-g7ba7d8e2f7b6)
    
    It appears that clang 19 does more sanity checks of unused class
    methods than gcc, the old version of Microsoft Visual C++ used by the
    AOO project, and older versions of clang.
    
    The assign method in the RefAndPointer class has been broken since
    before the code import from hg.  The proper fix is non-obvious and since
    this method appears to be unused, the easiest way of avoiding this error
    is to comment out the broken method.
    
    (cherry picked from commit bb4cf3dea05937a87b5ddea738bac45c713cc81e)
---
 main/writerfilter/source/ooxml/RefAndPointer.hxx | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/main/writerfilter/source/ooxml/RefAndPointer.hxx 
b/main/writerfilter/source/ooxml/RefAndPointer.hxx
index ce2d63cf80..dc543c8111 100644
--- a/main/writerfilter/source/ooxml/RefAndPointer.hxx
+++ b/main/writerfilter/source/ooxml/RefAndPointer.hxx
@@ -98,13 +98,14 @@ public:
     ChildClass * getPointer() const { return mpHandler; }
     const uno::Reference<Interface> getRef() const { return mRef; }
 
-    RefAndPointer & operator=
-    (const RefAndPointer & rSrc)
-    {
-        set(rSrc.getHandler());
-
-        return *this;
-    }
+// ...RefAndPointer.hxx:104:18: error: no member named 'getHandler' in 
'RefAndPointer<Interface, ChildClass>'; did you mean 'mpHandler'?
+//    RefAndPointer & operator=
+//    (const RefAndPointer & rSrc)
+//    {
+//        set(rSrc.getHandler());
+//
+//        return *this;
+//    }
 
     bool is() { return getRef().is(); }
 

Reply via email to