[Spice-devel] [PATCH spice-streaming-agent] test-stream-port: Remove warning compiling

Frediano Ziglio fziglio at redhat.com
Thu May 31 09:38:02 UTC 2018


This with gcc 8 causes:

test-stream-port.cpp: In function ‘void ____C_A_T_C_H____T_E_S_T____0()’:
test-stream-port.cpp:78:18: error: unused variable ‘buf’ [-Werror=unused-variable]
             char buf[10];
                  ^~~

Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
---
 src/unittests/test-stream-port.cpp | 1 -
 1 file changed, 1 deletion(-)

diff --git a/src/unittests/test-stream-port.cpp b/src/unittests/test-stream-port.cpp
index bb83447..e23a058 100644
--- a/src/unittests/test-stream-port.cpp
+++ b/src/unittests/test-stream-port.cpp
@@ -75,7 +75,6 @@ SCENARIO("test basic IO on the stream port", "[port][io]") {
         // - write() on the socketpair returns EPIPE, which throws WriteError
         WHEN("closing the remote end and trying to write") {
             ssa::write_all(fd[1], src_buf, src_size);
-            char buf[10];
             CHECK(close(fd[0]) == 0);
             CHECK_THROWS_AS(ssa::write_all(fd[1], src_buf, src_size), ssa::WriteError);
         }
-- 
2.17.0



More information about the Spice-devel mailing list