[Bug 244402] textproc/libstaroffice: Fix build with clang 10.0.0
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Tue Feb 25 17:55:27 UTC 2020
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=244402
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 at FreeBSD.org
Reporter: dim at FreeBSD.org
Blocks: 244251
Flags: maintainer-feedback?(office at FreeBSD.org)
Assignee: office at FreeBSD.org
Created attachment 211933
--> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=211933&action=edit
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<const
long, int> &' to prevent copying
for (auto const posToType : posToTypeMap) {
^~~~~~~~~~~~~~~~~~~~~~
&
StarObjectSmallGraphic.cxx:1392:21: error: loop variable 'poly' of type 'const
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 'final'
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=244251
[Bug 244251] [exp-run] Against projects/clang1000-import branch
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-ports-bugs
mailing list