Re: git: b37ebe5a89a3 - main - devel/libdap: Fix build with Clang 13+

From: Po-Chuan Hsieh <sunpoet_at_freebsd.org>
Date: Mon, 11 Jul 2022 14:05:33 UTC
On Mon, Jul 11, 2022 at 9:53 PM Po-Chuan Hsieh <sunpoet@freebsd.org> wrote:

> The branch main has been updated by sunpoet:
>
> URL:
> https://cgit.FreeBSD.org/ports/commit/?id=b37ebe5a89a33125910ddcdce34c31f0d700b2b5
>
> commit b37ebe5a89a33125910ddcdce34c31f0d700b2b5
> Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
> AuthorDate: 2022-07-11 13:49:19 +0000
> Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
> CommitDate: 2022-07-11 13:49:19 +0000
>
>     devel/libdap: Fix build with Clang 13+
>

It should be "devel/libdap: Fix build on i386".


>
>     HTTPCache.cc:1034:14: error: no matching function for call to 'min'
>             line[min(line_buf_len, strnlen(line, line_buf_len))-1] = '\0';
> // erase newline
>                  ^~~
>     /usr/include/c++/v1/__algorithm/min.h:40:1: note: candidate template
> ignored: deduced conflicting types for parameter '_Tp' ('unsigned long' vs.
> 'size_t' (aka 'unsigned int'))
>     min(const _Tp& __a, const _Tp& __b)
>     ^
>     /usr/include/c++/v1/__algorithm/min.h:51:1: note: candidate template
> ignored: could not match 'initializer_list<_Tp>' against 'unsigned long'
>     min(initializer_list<_Tp> __t, _Compare __comp)
>     ^
>     /usr/include/c++/v1/__algorithm/min.h:61:1: note: candidate function
> template not viable: requires single argument '__t', but 2 arguments were
> provided
>     min(initializer_list<_Tp> __t)
>     ^
>     /usr/include/c++/v1/__algorithm/min.h:31:1: note: candidate function
> template not viable: requires 3 arguments, but 2 were provided
>     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
>     ^
>     1 error generated.
>
>     Reported by:    pkg-fallout
>