Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

keep getting this warning. I have been using csv.h for years and always get this warning. How can I fix it? #233

Open
jerome2024 opened this issue Jun 5, 2024 · 1 comment

Comments

@jerome2024
Copy link

In file included from /usr/include/c++/13/string:51, from /usr/include/c++/13/bits/locale_classes.h:40, from /usr/include/c++/13/bits/ios_base.h:41, from /usr/include/c++/13/ios:44, from /usr/include/c++/13/ostream:40, from /usr/include/c++/13/iostream:41, from /home/jerome/Documents/C++/unger/pch.h:20, from /home/jerome/Documents/C++/unger/R/CMakeFiles/unger.dir/cmake_pch.hxx:5, from <command-line>: In static member function ‘static constexpr _Up* std::__copy_move<_IsMove, true, std::random_access_iterator_tag>::__copy_m(_Tp*, _Tp*, _Up*) [with _Tp = const char; _Up = char; bool _IsMove = false]’, inlined from ‘constexpr _OI std::__copy_move_a2(_II, _II, _OI) [with bool _IsMove = false; _II = const char*; _OI = char*]’ at /usr/include/c++/13/bits/stl_algobase.h:506:30, inlined from ‘constexpr _OI std::__copy_move_a1(_II, _II, _OI) [with bool _IsMove = false; _II = const char*; _OI = char*]’ at /usr/include/c++/13/bits/stl_algobase.h:533:42, inlined from ‘constexpr _OI std::__copy_move_a(_II, _II, _OI) [with bool _IsMove = false; _II = __gnu_cxx::__normal_iterator<const char*, vector<char> >; _OI = char*]’ at /usr/include/c++/13/bits/stl_algobase.h:540:31, inlined from ‘constexpr _OI std::copy(_II, _II, _OI) [with _II = __gnu_cxx::__normal_iterator<const char*, vector<char> >; _OI = char*]’ at /usr/include/c++/13/bits/stl_algobase.h:633:7, inlined from ‘static _ForwardIterator std::__uninitialized_copy<true>::__uninit_copy(_InputIterator, _InputIterator, _ForwardIterator) [with _InputIterator = __gnu_cxx::__normal_iterator<const char*, std::vector<char> >; _ForwardIterator = char*]’ at /usr/include/c++/13/bits/stl_uninitialized .h:147:27, inlined from ‘_ForwardIterator std::uninitialized_copy(_InputIterator, _InputIterator, _ForwardIterator) [with _InputIterator = __gnu_cxx::__normal_iterator<const char*, vector<char> >; _ForwardIterator = char*]’ at /usr/include/c++/13/bits/stl_uninitialized.h:185:15, inlined from ‘constexpr _ForwardIterator std::__uninitialized_copy_a(_InputIterator, _InputIterator, _ForwardIterator, allocator<_Tp>&) [with _InputIterator = __gnu_cxx::__normal_iterator<const char*, vector<char> >; _ForwardIterator = char*; _Tp = char]’ at /usr/include/c++/13/bits/stl_unini tialized.h:373:37, inlined from ‘constexpr std::vector<_Tp, _Alloc>::vector(const std::vector<_Tp, _Alloc>&) [with _Tp = char; _Alloc = std::allocator<char>]’ at /usr/include/c++/13/bits/stl_vector.h:603:31, inlined from ‘constexpr csv::CSVFormat::CSVFormat(const csv::CSVFormat&)’ at /home/jerome/Documents/C++/Include/utils/csv.h:4917:11, inlined from ‘csv::CSVGuessResult csv::internals::_guess_format(csv::string_view, const std::vector<char>&)’ at /home/jerome/Documents/C++/Include/utils/csv.h:7417:46, inlined from ‘csv::CSVReader::CSVReader(csv::string_view, csv::CSVFormat)’ at /home/jerome/Documents/C++/Include/utils/csv.h:7471:57: /usr/include/c++/13/bits/stl_algobase.h:437:30: warning: ‘void* __builtin_memcpy(void*, const void*, long unsigned int)’ reading between 2 and 9223372036854775807 bytes from a region of size 1 [-Wstringop-overread] 437 | __builtin_memmove(__result, __first, sizeof(_Tp) * _Num); | ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/x86_64-linux-gnu/c++/13/bits/c++allocator.h:33, from /usr/include/c++/13/bits/allocator.h:46, from /usr/include/c++/13/string:43: In member function ‘_Tp* std::__new_allocator<_Tp>::allocate(size_type, const void*) [with _Tp = char]’, inlined from ‘constexpr _Tp* std::allocator< <template-parameter-1-1> >::allocate(std::size_t) [with _Tp = char]’ at /usr/include/c++/13/bits/allocator.h:198:40, inlined from ‘static constexpr _Tp* std::allocator_traits<std::allocator<_CharT> >::allocate(allocator_type&, size_type) [with _Tp = char]’ at /usr/include/c++/13/bits/alloc_traits.h:482:28, inlined from ‘constexpr std::_Vector_base<_Tp, _Alloc>::pointer std::_Vector_base<_Tp, _Alloc>::_M_allocate(std::size_t) [with _Tp = char; _Alloc = std::allocator<char>]’ at /usr/include/c++/13/bits/stl_vector.h:378:33, inlined from ‘constexpr void std::vector<_Tp, _Alloc>::_M_range_initialize(_ForwardIterator, _ForwardIterator, std::forward_iterator_tag) [with _ForwardIterator = const char*; _Tp = char; _Alloc = std::allocator<char>]’ at /usr/include/c++/13/bits/stl_vector.h:1689:25, inlined from ‘constexpr std::vector<_Tp, _Alloc>::vector(std::initializer_list<_Tp>, const allocator_type&) [with _Tp = char; _Alloc = std::allocator<char>]’ at /usr/include/c++/13/bits/stl_vector.h:679:21, inlined from ‘constexpr csv::CSVFormat::CSVFormat()’ at /home/jerome/Documents/C++/Include/utils/csv.h:4920:9, inlined from ‘csv::CSVGuessResult csv::internals::_guess_format(csv::string_view, const std::vector<char>&)’ at /home/jerome/Documents/C++/Include/utils/csv.h:7411:23, inlined from ‘csv::CSVReader::CSVReader(csv::string_view, csv::CSVFormat)’ at /home/jerome/Documents/C++/Include/utils/csv.h:7471:57: /usr/include/c++/13/bits/new_allocator.h:147:55: note: source object of size 1 allocated by ‘operator new’ 147 | return static_cast<_Tp*>(_GLIBCXX_OPERATOR_NEW(__n * sizeof(_Tp))); |

@jerome2024
Copy link
Author

apologies for the crappy format I sent it in

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant