meson: fix -werror, tests and format
Dependent projects are compiled with -werror and failing because of this
dependency.
For example phosphor-bmc-code-mgmt.
```
../subprojects/stdplus/include/stdplus/net/addr/ip.hpp:550:26: error: space between quotes and suffix is deprecated in C++23 [-Werror=deprecated-literal-operator]
550 | constexpr auto operator"" _ip() noexcept
| ^~
| --
```
test/io_uring.cpp had to be fixed because there was an access to an
optional which had been ```.reset()``` previously.
Tested: Unit Tests Pass
Change-Id: Iae8bff96cf69a82aea8c1964cfd35908946d7f47
Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/test/fd/fmt.cpp b/test/fd/fmt.cpp
index bdac7a4..cf4a319 100644
--- a/test/fd/fmt.cpp
+++ b/test/fd/fmt.cpp
@@ -27,7 +27,7 @@
buf.flush();
EXPECT_EQ(6, fd.lseek(0, Whence::Cur));
- buf.append(FMT_COMPILE("{}"), std::string(2050, 'a'));
+ buf.append("{}", std::string(2050, 'a'));
EXPECT_EQ(6, fd.lseek(0, Whence::Cur));
buf.append("{}", std::string(2050, 'a'));
EXPECT_EQ(4106, fd.lseek(0, Whence::Cur));
diff --git a/test/io_uring.cpp b/test/io_uring.cpp
index 7a646e2..54b9cef 100644
--- a/test/io_uring.cpp
+++ b/test/io_uring.cpp
@@ -264,9 +264,11 @@
testFdWrite(*fh, IOSQE_FIXED_FILE);
// Without registration we should only be able to write to the regular fd
+ int old_fd = *fh;
fh.reset();
testFdWrite(STDERR_FILENO, 0);
- testFdWrite(*fh, IOSQE_FIXED_FILE, -EBADF);
+ testFdWrite(STDOUT_FILENO, IOSQE_FIXED_FILE, -EBADF);
+ testFdWrite(old_fd, IOSQE_FIXED_FILE, -EBADF);
std::vector<IoUring::FileHandle> fhs;
EXPECT_LT(ring.getFiles().size(), 9);