You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/usr/ports/devel/doctest/work/doctest-2.4.11/doctest/parts/doctest_fwd.h:1177:61: error: 'in' is an unsafe buffer that does not perform bounds checks [-Werror,-Wunsafe-buffer-usage]
static void fill(std::ostream* stream, const char (&in)[N]) {
~~~~~~~~~~~~~^~~~~~
/usr/ports/devel/doctest/work/doctest-2.4.11/doctest/parts/doctest_fwd.h:1050:22: note: in instantiation of member function 'doctest::detail::filldata<const char[3]>::fill' requested here
filldata<T>::fill(stream, in);
^
/usr/ports/devel/doctest/work/doctest-2.4.11/doctest/parts/doctest_fwd.h:1057:9: note: in instantiation of function template specialization 'doctest::detail::filloss<const char[3]>' requested here
filloss<typename types::remove_reference<decltype(in)>::type>(stream, in);
^
In file included from /usr/ports/devel/doctest/work/doctest-2.4.11/examples/all_features/main.cpp:2:
In file included from /usr/ports/devel/doctest/work/doctest-2.4.11/scripts/development_only/doctest/doctest.h:1:
/usr/ports/devel/doctest/work/doctest-2.4.11/doctest/parts/doctest_fwd.h:608:47: error: unsafe buffer access [-Werror,-Wunsafe-buffer-usage]
bool isOnStack() const noexcept { return (buf[last] & 128) == 0; }
^~~
In file included from /usr/ports/devel/doctest/work/doctest-2.4.11/examples/all_features/main.cpp:2:
In file included from /usr/ports/devel/doctest/work/doctest-2.4.11/scripts/development_only/doctest/doctest.h:5:
/usr/ports/devel/doctest/work/doctest-2.4.11/doctest/parts/doctest.cpp:217:29: error: 'a' is an unsafe pointer used for buffer access [-Werror,-Wunsafe-buffer-usage]
int stricmp(const char* a, const char* b) {
~~~~~~~~~~~~^
/usr/ports/devel/doctest/work/doctest-2.4.11/doctest/parts/doctest.cpp:218:16: note: used in pointer arithmetic here
for(;; a++, b++) {
^
/usr/ports/devel/doctest/work/doctest-2.4.11/doctest/parts/doctest.cpp:217:44: error: 'b' is an unsafe pointer used for buffer access [-Werror,-Wunsafe-buffer-usage]
int stricmp(const char* a, const char* b) {
~~~~~~~~~~~~^
/usr/ports/devel/doctest/work/doctest-2.4.11/doctest/parts/doctest.cpp:218:21: note: used in pointer arithmetic here
for(;; a++, b++) {
^
/usr/ports/devel/doctest/work/doctest-2.4.11/doctest/parts/doctest.cpp:510:9: error: unsafe buffer access [-Werror,-Wunsafe-buffer-usage]
buf[sz] = '\0';
^~~
/usr/ports/devel/doctest/work/doctest-2.4.11/doctest/parts/doctest.cpp:518:9: error: unsafe buffer access [-Werror,-Wunsafe-buffer-usage]
data.ptr[sz] = '\0';
^~~~~~~~
Version: 2.4.11
clang-16
FreeBSD 13.2
The text was updated successfully, but these errors were encountered:
This could be resolved via the addition of DOCTEST_CLANG_SUPPRESS_WARNING("-Wunsafe-buffer-usage") into the DOCTEST_SUPPRESS_COMMON_WARNINGS_PUSH macro. The warning appears to be hinting towards using STL types such as std::span or std::array in place of a plain array/pointer, however that probably shouldn't be applicable to a library like this.
Version: 2.4.11
clang-16
FreeBSD 13.2
The text was updated successfully, but these errors were encountered: