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>
1 file changed
tree: bb4600c8d7f5b7d701b0b111f7296f2f3c2b971d
  1. example/
  2. src/
  3. subprojects/
  4. test/
  5. .clang-format
  6. .clang-ignore
  7. .clang-tidy
  8. .gitignore
  9. .lcovrc
  10. LICENSE
  11. MAINTAINERS
  12. meson.build
  13. meson_options.txt
  14. README.md
README.md

sdeventplus

sdeventplus is a c++ wrapper around the systemd sd_event apis meant to provide c++ ergonomics to their usage.

Dependencies

The sdeventplus library requires a libsystemd development package on the system for sd-event.

Building

For a standard release build, you want something like:

meson setup -Dexamples=false -Dtests=disabled builddir
ninja -C builddir
ninja -C builddir install

For a test / debug build, a typical configuration is

meson setup -Dtests=enabled builddir
meson test -C builddir