forked from OSchip/llvm-project
[asan] initialze varaibles to avoid a (false positive) report from gcc's -Wmaybe-uninitialized
llvm-svn: 211008
This commit is contained in:
parent
c5e025831b
commit
9f5d48c0a0
|
@ -1812,7 +1812,7 @@ INTERCEPTOR(int, getsockopt, int sockfd, int level, int optname, void *optval,
|
||||||
INTERCEPTOR(int, accept, int fd, void *addr, unsigned *addrlen) {
|
INTERCEPTOR(int, accept, int fd, void *addr, unsigned *addrlen) {
|
||||||
void *ctx;
|
void *ctx;
|
||||||
COMMON_INTERCEPTOR_ENTER(ctx, accept, fd, addr, addrlen);
|
COMMON_INTERCEPTOR_ENTER(ctx, accept, fd, addr, addrlen);
|
||||||
unsigned addrlen0;
|
unsigned addrlen0 = 0;
|
||||||
if (addrlen) {
|
if (addrlen) {
|
||||||
COMMON_INTERCEPTOR_READ_RANGE(ctx, addrlen, sizeof(*addrlen));
|
COMMON_INTERCEPTOR_READ_RANGE(ctx, addrlen, sizeof(*addrlen));
|
||||||
addrlen0 = *addrlen;
|
addrlen0 = *addrlen;
|
||||||
|
@ -1834,7 +1834,7 @@ INTERCEPTOR(int, accept, int fd, void *addr, unsigned *addrlen) {
|
||||||
INTERCEPTOR(int, accept4, int fd, void *addr, unsigned *addrlen, int f) {
|
INTERCEPTOR(int, accept4, int fd, void *addr, unsigned *addrlen, int f) {
|
||||||
void *ctx;
|
void *ctx;
|
||||||
COMMON_INTERCEPTOR_ENTER(ctx, accept4, fd, addr, addrlen, f);
|
COMMON_INTERCEPTOR_ENTER(ctx, accept4, fd, addr, addrlen, f);
|
||||||
unsigned addrlen0;
|
unsigned addrlen0 = 0;
|
||||||
if (addrlen) {
|
if (addrlen) {
|
||||||
COMMON_INTERCEPTOR_READ_RANGE(ctx, addrlen, sizeof(*addrlen));
|
COMMON_INTERCEPTOR_READ_RANGE(ctx, addrlen, sizeof(*addrlen));
|
||||||
addrlen0 = *addrlen;
|
addrlen0 = *addrlen;
|
||||||
|
|
Loading…
Reference in New Issue