[Spice-devel] [PATCH spice-server] red-record-qxl: fix clang warning
Frediano Ziglio
fziglio at redhat.com
Mon Mar 12 12:33:47 UTC 2018
Fix clang warning:
red-record-qxl.c:893:13: error: variable 'fd_in' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized]
if (ret)
This is technically impossible but is not on a hot path.
Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
---
server/red-record-qxl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/server/red-record-qxl.c b/server/red-record-qxl.c
index 48b3169f..5f6b7aeb 100644
--- a/server/red-record-qxl.c
+++ b/server/red-record-qxl.c
@@ -886,7 +886,7 @@ RedRecord *red_record_new(const char *filename)
GError *error = NULL;
GPid child_pid;
gboolean ret;
- gint fd_in;
+ gint fd_in = -1;
ret = g_shell_parse_argv(filter, &argc, &argv, &error);
--
2.14.3
More information about the Spice-devel
mailing list