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

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


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

commit 86b833de93a6b1119d59a9bff41adb09d8ae9c84
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 48701de878..75e9dc35b5 100644
--- a/main/writerfilter/source/ooxml/RefAndPointer.hxx
+++ b/main/writerfilter/source/ooxml/RefAndPointer.hxx
@@ -75,13 +75,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