example/delayed_echo: Fix bogus compiler warning
An std::array size may be uninitialized? ok...
```
../example/delayed_echo.cpp: In lambda function:
../example/delayed_echo.cpp:46:29: error: ‘buffer’ may be used uninitialized [-Werror=maybe-uninitialized]
46 | ssize_t bytes = read(fd, buffer.data(), std::size(buffer));
| ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/11/array:41,
from ../example/delayed_echo.cpp:6:
/usr/include/c++/11/bits/range_access.h:245:5: note: by argument 1 of type ‘const std::array<char, 4096>&’ to ‘constexpr decltype (__cont.size()) std::size(const _Container&) [with _Container = std::array<char, 4096>]’ declared here
245 | size(const _Container& __cont) noexcept(noexcept(__cont.size()))
| ^~~~
../example/delayed_echo.cpp:45:32: note: ‘buffer’ declared here
45 | std::array<char, 4096> buffer;
```
Change-Id: I534dcfe5c4e2b843a061066548d8a4f9e6f9cc6f
Signed-off-by: William A. Kennington III <wak@google.com>
diff --git a/example/delayed_echo.cpp b/example/delayed_echo.cpp
index e7fc33b..db90523 100644
--- a/example/delayed_echo.cpp
+++ b/example/delayed_echo.cpp
@@ -43,7 +43,7 @@
auto ioCb = [&](IO&, int fd, uint32_t) {
std::array<char, 4096> buffer;
- ssize_t bytes = read(fd, buffer.data(), buffer.size());
+ ssize_t bytes = read(fd, buffer.data(), 4096);
if (bytes <= 0)
{
printf("%s", content.c_str());