diff options
author | Sven Gothel <[email protected]> | 2022-07-07 12:01:38 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2022-07-07 12:01:38 +0200 |
commit | 0b8d561d1723a7e58e25584ed8de12a473b0c6f7 (patch) | |
tree | 3004a86278e1717735995c6dc9e229a4258ed223 /test/test_bytestream01.cpp | |
parent | 447dd8d5285ce8206bdd2189a1ef704a3a994d7f (diff) |
test_bytestream01.cpp: Fix unused return value warning -> error gcc 11.2
Diffstat (limited to 'test/test_bytestream01.cpp')
-rw-r--r-- | test/test_bytestream01.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/test/test_bytestream01.cpp b/test/test_bytestream01.cpp index 31b833a..46dac65 100644 --- a/test/test_bytestream01.cpp +++ b/test/test_bytestream01.cpp @@ -96,21 +96,21 @@ class TestByteStream01 { } ~TestByteStream01() { -#ifdef USE_LIBCURL - int res = std::system("killall mini_httpd"); - (void)res; -#endif // USE_LIBCURL + if( jau::io::uri_tk::protocol_supported("http:") ) { + int res = std::system("killall mini_httpd"); + (void)res; + } } static void httpd_start() { -#ifdef USE_LIBCURL - 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()); - res = std::system(cmd.c_str()); - (void)res; -#endif // USE_LIBCURL + if( jau::io::uri_tk::protocol_supported("http:") ) { + 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()); + res = std::system(cmd.c_str()); + (void)res; + } } static bool transfer(jau::io::ByteInStream& input, const std::string& output_fname, const size_t buffer_size=4096) { |