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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---
 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

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]