Merge topic 'libuv-scanbuild-fixes'
c03a7b4f CTestCustom: Suppress scan-build warnings in libuv 3825a564 libuv: Simplify variable initializations to satisfy Clang scan-build
This commit is contained in:
commit
4da61391ee
@ -62,6 +62,7 @@ list(APPEND CTEST_CUSTOM_WARNING_EXCEPTION
|
|||||||
"warning.*This version of Mac OS X is unsupported"
|
"warning.*This version of Mac OS X is unsupported"
|
||||||
"clang.*: warning: argument unused during compilation: .-g"
|
"clang.*: warning: argument unused during compilation: .-g"
|
||||||
"note: in expansion of macro" # diagnostic context note
|
"note: in expansion of macro" # diagnostic context note
|
||||||
|
"note: expanded from macro" # diagnostic context note
|
||||||
"cm(StringCommand|CTestTestHandler)\\.cxx.*warning.*rand.*may return deterministic values"
|
"cm(StringCommand|CTestTestHandler)\\.cxx.*warning.*rand.*may return deterministic values"
|
||||||
"cm(StringCommand|CTestTestHandler)\\.cxx.*warning.*rand.*isn.*t random" # we do not do crypto
|
"cm(StringCommand|CTestTestHandler)\\.cxx.*warning.*rand.*isn.*t random" # we do not do crypto
|
||||||
"cm(StringCommand|CTestTestHandler)\\.cxx.*warning.*srand.*seed choices are.*poor" # we do not do crypto
|
"cm(StringCommand|CTestTestHandler)\\.cxx.*warning.*srand.*seed choices are.*poor" # we do not do crypto
|
||||||
@ -82,6 +83,8 @@ list(APPEND CTEST_CUSTOM_WARNING_EXCEPTION
|
|||||||
"cm_sha2.*warning: Value stored to.*is never read"
|
"cm_sha2.*warning: Value stored to.*is never read"
|
||||||
"testProcess.*warning: Dereference of null pointer .loaded from variable .invalidAddress.."
|
"testProcess.*warning: Dereference of null pointer .loaded from variable .invalidAddress.."
|
||||||
"liblzma/simple/x86.c:[0-9]+:[0-9]+: warning: The result of the '<<' expression is undefined"
|
"liblzma/simple/x86.c:[0-9]+:[0-9]+: warning: The result of the '<<' expression is undefined"
|
||||||
|
"libuv/src/.*:[0-9]+:[0-9]+: warning: Dereference of null pointer"
|
||||||
|
"libuv/src/.*:[0-9]+:[0-9]+: warning: The left operand of '==' is a garbage value"
|
||||||
)
|
)
|
||||||
|
|
||||||
if(NOT "@CMAKE_GENERATOR@" MATCHES "Xcode")
|
if(NOT "@CMAKE_GENERATOR@" MATCHES "Xcode")
|
||||||
|
@ -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) {
|
int uv_pipe_bind(uv_pipe_t* handle, const char* name) {
|
||||||
struct sockaddr_un saddr;
|
struct sockaddr_un saddr;
|
||||||
const char* pipe_fname;
|
const char* pipe_fname = NULL;
|
||||||
int sockfd;
|
int sockfd = -1;
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
pipe_fname = NULL;
|
|
||||||
sockfd = -1;
|
|
||||||
|
|
||||||
/* Already bound? */
|
/* Already bound? */
|
||||||
if (uv__stream_fd(handle) >= 0)
|
if (uv__stream_fd(handle) >= 0)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
@ -58,8 +58,8 @@ static int uv__tty_is_slave(const int fd) {
|
|||||||
|
|
||||||
int uv_tty_init(uv_loop_t* loop, uv_tty_t* tty, int fd, int readable) {
|
int uv_tty_init(uv_loop_t* loop, uv_tty_t* tty, int fd, int readable) {
|
||||||
uv_handle_type type;
|
uv_handle_type type;
|
||||||
int flags;
|
int flags = 0;
|
||||||
int newfd;
|
int newfd = -1;
|
||||||
int r;
|
int r;
|
||||||
int saved_flags;
|
int saved_flags;
|
||||||
char path[256];
|
char path[256];
|
||||||
@ -72,9 +72,6 @@ int uv_tty_init(uv_loop_t* loop, uv_tty_t* tty, int fd, int readable) {
|
|||||||
if (type == UV_FILE || type == UV_UNKNOWN_HANDLE)
|
if (type == UV_FILE || type == UV_UNKNOWN_HANDLE)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
flags = 0;
|
|
||||||
newfd = -1;
|
|
||||||
|
|
||||||
/* Reopen the file descriptor when it refers to a tty. This lets us put the
|
/* Reopen the file descriptor when it refers to a tty. This lets us put the
|
||||||
* tty in non-blocking mode without affecting other processes that share it
|
* tty in non-blocking mode without affecting other processes that share it
|
||||||
* with us.
|
* with us.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user