[Bug 244641] benchmarks/libcelero: Fix build with clang 10.0.0

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Fri Mar 6 18:34:29 UTC 2020


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=244641

            Bug ID: 244641
           Summary: benchmarks/libcelero: 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: yuri at freebsd.org
          Reporter: dim at FreeBSD.org
            Blocks: 244251
             Flags: maintainer-feedback?(yuri at freebsd.org)
          Assignee: yuri at freebsd.org

Created attachment 212203
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=212203&action=edit
Fix benchmarks/libcelero build with clang 10.0.0

As reported in bug 244251, with clang 10.0.0 the benchmarks/libcelero port runs
into a -Werror warning:

/wrkdirs/usr/ports/benchmarks/libcelero/work/Celero-2.6.0/src/TestFixture.cpp:138:18:
error: loop variable 'udm' of type 'const
std::__1::shared_ptr<celero::UserDefinedMeasurement>' creates a copy from type
'const std::__1::shared_ptr<celero::UserDefinedMeasurement>'
[-Werror,-Wrange-loop-construct]
                for(const auto udm : udms)
                               ^
/wrkdirs/usr/ports/benchmarks/libcelero/work/Celero-2.6.0/src/TestFixture.cpp:138:7:
note: use reference type 'const
std::__1::shared_ptr<celero::UserDefinedMeasurement> &' to prevent copying
                for(const auto udm : udms)
                    ^~~~~~~~~~~~~~~~
                               &

The fix is to add the '&' as it suggests.


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