Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 25 Feb 2020 17:55:25 +0000
From:      bugzilla-noreply@freebsd.org
To:        ports-bugs@FreeBSD.org
Subject:   [Bug 244402] textproc/libstaroffice: Fix build with clang 10.0.0
Message-ID:  <bug-244402-7788@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D244402

            Bug ID: 244402
           Summary: textproc/libstaroffice: Fix build with clang 10.0.0
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: Individual Port(s)
          Assignee: office@FreeBSD.org
          Reporter: dim@FreeBSD.org
            Blocks: 244251
             Flags: maintainer-feedback?(office@FreeBSD.org)
          Assignee: office@FreeBSD.org

Created attachment 211933
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D211933&action=
=3Dedit
Fix several -Werror warnings in libstaroffice

As reported in bug 244251, with clang 10.0.0 the textproc/libstaroffice port
runs into several -Werror warnings:

In file included from SDCParser.cxx:43:
./STOFFSpreadsheetListener.hxx:70:31: error: class with destructor marked
'final' cannot be inherited from [-Werror,-Wfinal-dtor-non-final-class]
  ~STOFFSpreadsheetListener() final;
                              ^
./STOFFSpreadsheetListener.hxx:64:7: note: mark 'STOFFSpreadsheetListener' =
as
'final' to silence this warning
class STOFFSpreadsheetListener : public STOFFListener
      ^

STOFFOLEParser.cxx:509:19: error: loop variable 'posToType' of type 'const
std::__1::pair<const long, int>' creates a copy from type 'const
std::__1::pair<const long, int>' [-Werror,-Wrange-loop-construct]
  for (auto const posToType : posToTypeMap) {
                  ^
STOFFOLEParser.cxx:509:8: note: use reference type 'const std::__1::pair<co=
nst
long, int> &' to prevent copying
  for (auto const posToType : posToTypeMap) {
       ^~~~~~~~~~~~~~~~~~~~~~
                  &

StarObjectSmallGraphic.cxx:1392:21: error: loop variable 'poly' of type 'co=
nst
StarGraphicStruct::StarPolygon' creates a copy from type 'const
StarGraphicStruct::StarPolygon' [-Werror,-Wrange-loop-construct]
    for (auto const poly : m_pathPolygons)
                    ^
StarObjectSmallGraphic.cxx:1392:10: note: use reference type 'const
StarGraphicStruct::StarPolygon &' to prevent copying
    for (auto const poly : m_pathPolygons)
         ^~~~~~~~~~~~~~~~~
                    &

StarObjectSmallGraphic.cxx:1415:20: error: class with destructor marked 'fi=
nal'
cannot be inherited from [-Werror,-Wfinal-dtor-non-final-class]
  ~SdrGraphicUno() final;
                   ^
StarObjectSmallGraphic.cxx:1405:7: note: mark
'StarObjectSmallGraphicInternal::SdrGraphicUno' as 'final' to silence this
warning
class SdrGraphicUno : public SdrGraphicRect
      ^

These are all pretty trivial to fix, patch is attached.


Referenced Bugs:

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D244251
[Bug 244251] [exp-run] Against projects/clang1000-import branch
--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-244402-7788>