diff options
author | Brad King <brad.king@kitware.com> | 2016-09-01 15:09:25 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2016-09-01 15:10:18 (GMT) |
commit | 3825a564930ffe09fd681632a905ab9c91c41d98 (patch) | |
tree | 2b748d46edc7d906ee8ccea8cec94fc7f3a2b294 /Utilities/cmlibuv/src/unix/pipe.c | |
parent | 0c46750d2c4cee401f1cda047a71b0e349678077 (diff) | |
download | CMake-3825a564930ffe09fd681632a905ab9c91c41d98.zip CMake-3825a564930ffe09fd681632a905ab9c91c41d98.tar.gz CMake-3825a564930ffe09fd681632a905ab9c91c41d98.tar.bz2 |
libuv: Simplify variable initializations to satisfy Clang scan-build
The Clang scan-build tool warns about assignments whose values are never
used, so initialize local variables at declaration instead.
Diffstat (limited to 'Utilities/cmlibuv/src/unix/pipe.c')
-rw-r--r-- | Utilities/cmlibuv/src/unix/pipe.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/Utilities/cmlibuv/src/unix/pipe.c b/Utilities/cmlibuv/src/unix/pipe.c index b73994c..80f5e6f 100644 --- a/Utilities/cmlibuv/src/unix/pipe.c +++ b/Utilities/cmlibuv/src/unix/pipe.c @@ -42,13 +42,10 @@ int uv_pipe_init(uv_loop_t* loop, uv_pipe_t* handle, int ipc) { int uv_pipe_bind(uv_pipe_t* handle, const char* name) { struct sockaddr_un saddr; - const char* pipe_fname; - int sockfd; + const char* pipe_fname = NULL; + int sockfd = -1; int err; - pipe_fname = NULL; - sockfd = -1; - /* Already bound? */ if (uv__stream_fd(handle) >= 0) return -EINVAL; |