pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/security/olm olm: avoid ambiguous math functions



details:   https://anonhg.NetBSD.org/pkgsrc/rev/61de5d5d72b9
branches:  trunk
changeset: 377937:61de5d5d72b9
user:      tnn <tnn%pkgsrc.org@localhost>
date:      Mon Apr 25 13:58:46 2022 +0000

description:
olm: avoid ambiguous math functions

diffstat:

 security/olm/distinfo                              |   3 ++-
 security/olm/patches/patch-tests_include_doctest.h |  19 +++++++++++++++++++
 2 files changed, 21 insertions(+), 1 deletions(-)

diffs (34 lines):

diff -r c6a60e46f85a -r 61de5d5d72b9 security/olm/distinfo
--- a/security/olm/distinfo     Mon Apr 25 13:53:15 2022 +0000
+++ b/security/olm/distinfo     Mon Apr 25 13:58:46 2022 +0000
@@ -1,5 +1,6 @@
-$NetBSD: distinfo,v 1.5 2022/01/25 12:55:43 ryoon Exp $
+$NetBSD: distinfo,v 1.6 2022/04/25 13:58:46 tnn Exp $
 
 BLAKE2s (olm-3.2.10.tar.bz2) = 84c6a275ef0dda8371152f198ea0559d2531f51509a152223b148698d1b722c8
 SHA512 (olm-3.2.10.tar.bz2) = 127a81f8585550fb59b922e656b877251fbc96b5b61629a9faaf10b82c88c28f5036de815803c654d9d82c436c75e11dd3b96c6a6cb14d4ae686b24ce3dcff94
 Size (olm-3.2.10.tar.bz2) = 2733952 bytes
+SHA1 (patch-tests_include_doctest.h) = d0da2f52ce14c454bc644e37fae238fab79e1c10
diff -r c6a60e46f85a -r 61de5d5d72b9 security/olm/patches/patch-tests_include_doctest.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/security/olm/patches/patch-tests_include_doctest.h        Mon Apr 25 13:58:46 2022 +0000
@@ -0,0 +1,19 @@
+$NetBSD: patch-tests_include_doctest.h,v 1.1 2022/04/25 13:58:46 tnn Exp $
+
+avoid ambigous call to std::log10.
+
+--- tests/include/doctest.h.orig       2022-01-10 10:00:49.000000000 +0000
++++ tests/include/doctest.h
+@@ -5914,9 +5914,9 @@ namespace {
+             separator_to_stream();
+             s << std::dec;
+ 
+-            auto totwidth = int(std::ceil(log10((std::max(p.numTestCasesPassingFilters, static_cast<unsigned>(p.numAsserts))) + 1)));
+-            auto passwidth = int(std::ceil(log10((std::max(p.numTestCasesPassingFilters - p.numTestCasesFailed, static_cast<unsigned>(p.numAsserts - p.numAssertsFailed))) + 1)));
+-            auto failwidth = int(std::ceil(log10((std::max(p.numTestCasesFailed, static_cast<unsigned>(p.numAssertsFailed))) + 1)));
++            auto totwidth = int(std::ceil(std::log10((std::max(p.numTestCasesPassingFilters, static_cast<unsigned>(p.numAsserts))) + 1)));
++            auto passwidth = int(std::ceil(std::log10((std::max(p.numTestCasesPassingFilters - p.numTestCasesFailed, static_cast<unsigned>(p.numAsserts - p.numAssertsFailed))) + 1)));
++            auto failwidth = int(std::ceil(std::log10((std::max(p.numTestCasesFailed, static_cast<unsigned>(p.numAssertsFailed))) + 1)));
+             const bool anythingFailed = p.numTestCasesFailed > 0 || p.numAssertsFailed > 0;
+             s << Color::Cyan << "[doctest] " << Color::None << "test cases: " << std::setw(totwidth)
+               << p.numTestCasesPassingFilters << " | "



Home | Main Index | Thread Index | Old Index