diff options
author | Sven Gothel <[email protected]> | 2022-06-18 05:45:23 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2022-06-18 05:45:23 +0200 |
commit | 63093fad90859597debf490004550815fa997bdb (patch) | |
tree | 3ffebfe1df8aec93e5b5a043eb642707ca896dbe /test/test_iostream01.cpp | |
parent | f28e1f358cb161976e542822ea4bf10a9aaa1155 (diff) |
gcc 9.4 (Ubuntu 20.04): Fix error: ignoring return value of ‘int system(const char*)’, declared with attribute warn_unused_result [-Werror=unused-result]
Diffstat (limited to 'test/test_iostream01.cpp')
-rw-r--r-- | test/test_iostream01.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/test/test_iostream01.cpp b/test/test_iostream01.cpp index af39e27..b0014cd 100644 --- a/test/test_iostream01.cpp +++ b/test/test_iostream01.cpp @@ -70,15 +70,17 @@ class TestIOStream01 { ofs.write(reinterpret_cast<char*>(one_line.data()), one_line.size()); } } - std::system("killall mini_httpd"); + int res = std::system("killall mini_httpd"); const std::string cwd = jau::fs::get_cwd(); const std::string cmd = "/usr/sbin/mini_httpd -p 8080 -l "+cwd+"/mini_httpd.log"; jau::PLAIN_PRINT(true, "%s", cmd.c_str()); - std::system(cmd.c_str()); + res = std::system(cmd.c_str()); + (void)res; } ~TestIOStream01() { - std::system("killall mini_httpd"); + int res = std::system("killall mini_httpd"); + (void)res; } void test00_protocols() { |